FSF GCC merge 02/23/03
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / defarg8.C
blob42ddcb8f4d44c7d426a9469a91d64dd710a9e361
1 // Build don't link:
2 // Special g++ options: -pedantic-errors -ansi -w
4 // Copyright (C) 2000, 2002 Free Software Foundation, Inc.
5 // Contributed by Nathan Sidwell 7 Jan 2001 <nathan@codesourcery.com>
7 // As of G++ 3.4, we no longer attempt to detect dependencies; the
8 // standard does not require that we do.
10 // Bug 1038. Default args on class members can produce circular dependencies.
11 // Make sure we spot them, and don't depend on a particular ordering.
13 struct AA
15   static int Foo (int = Baz ()); // ERROR - not yet been parsed
16   static int Baz (int = Foo ());
19 int main ()
21   AA::Foo ();
22   AA::Foo (1);
23   AA::Baz ();
24   AA::Baz (1);
25   
26   return 0;