1 /* { dg-options "" } */
2 /* In GNU C++ mode, we recognize the anonymous struct extension,
3 but not Microsoft C extensions. */
8 struct A; /* forward decl of B::A. */
11 char testB[sizeof(B) == sizeof(A) ? 1 : -1];
14 struct D { char d; }; /* decl of C::D. */
17 char testC[sizeof(C) == sizeof(A) ? 1 : -1];
18 char testD[sizeof(C::D) == sizeof(A) ? 1 : -1];
25 char testE[sizeof(E) == 2 * sizeof(A) ? 1 : -1];
26 char testEz[sizeof( ((E *)0)->z )];
28 typedef struct A typedef_A;
30 typedef_A; /* { dg-error "does not declare anything" } */
33 char testF[sizeof(F) == sizeof(A) ? 1 : -1];
35 /* Test that __extension__ does the right thing coming _from_ GNU C mode. */
36 __extension__ struct G {
40 char testG[sizeof(G) == 2 * sizeof(A) ? 1 : -1];
46 char testH[sizeof(H) == 2 * sizeof(A) ? 1 : -1];