C99 testsuite readiness: Compile more tests with -std=gnu89
[official-gcc.git] / gcc / testsuite / g++.dg / pr103530.C
blobc1d2059542ba3da27ca8ffdebaa5b952e41da735
1 /* { dg-do compile } */
2 /* { dg-options "-O -fharden-compares -Wno-c++11-extensions" } */
4 enum E:bool
5 { E0, E1 };
7 int x;
10 baz (E rtt)
12   return rtt == E0 ? E1 : E0;
15 bool bar ();
17 void
18 foo (E)
20   E a = x ? E1 : E0;
21   if (bar ())
22     if (bar ())
23       {
24         E b = baz (a);
25         foo (b);
26       }