summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.old-deja/g++.other/warn5.C
blob: 84fa3e426b2b4cacf7ef8b6dd292b81288b8ed9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
// { dg-do assemble  }
// { dg-options "-W " }
// 
// Copyright (C) 2000 Free Software Foundation, Inc.
// Contributed by Nathan Sidwell 6 Febs 2001 <nathan@codesourcery.com>

// Bug 1765. We gave bogus warning on default initializer.

struct X
{
  int i;
};

X *foo ()
{
  return new X ();  // gets bogus warning
}

X x = {};           // { dg-warning "" } missing initializer