OSDN Git Service

cp:
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.old-deja / g++.other / warn5.C
1 // Special g++ Options: -W 
2 // Build don't link:
3 // 
4 // Copyright (C) 2000 Free Software Foundation, Inc.
5 // Contributed by Nathan Sidwell 6 Febs 2001 <nathan@codesourcery.com>
6
7 // Bug 1765. We gave bogus warning on default initializer.
8
9 struct X
10 {
11   int i;
12 };
13
14 X *foo ()
15 {
16   return new X ();  // gets bogus warning
17 }
18
19 X x = {};           // WARNING - missing initializer