Make transitive relations an oracle option
[official-gcc.git] / gcc / testsuite / g++.old-deja / g++.other / defarg8.C
blob35984318606b0912cd85e8fd2b4462009d50169b
1 // { dg-do assemble  }
2 // { dg-options "-pedantic-errors -ansi -w" }
4 // Copyright (C) 2000, 2002, 2003 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 ()); // { dg-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;