1 /* { dg-options "-std=iso9899:1990" } */
2 /* In strict ISO C mode, we don't recognize the anonymous struct/union
3 extension or any Microsoft extensions. */
9 struct A
; /* { dg-warning "does not declare anything" } */
12 char testB
[sizeof(struct B
) == sizeof(struct A
) ? 1 : -1];
16 struct D
{ char d
; }; /* { dg-warning "does not declare anything" } */
19 char testC
[sizeof(struct C
) == sizeof(struct A
) ? 1 : -1];
20 char testD
[sizeof(struct D
) == sizeof(struct A
) ? 1 : -1];
24 struct { char z
; }; /* { dg-warning "does not declare anything" } */
27 char testE
[sizeof(struct E
) == sizeof(struct A
) ? 1 : -1];
30 typedef struct A typedef_A
;
32 typedef_A
; /* { dg-warning "does not declare anything" } */
35 char testF
[sizeof(struct F
) == sizeof(struct A
) ? 1 : -1];
37 /* __extension__ enables GNU C mode for the duration of the declaration. */
38 __extension__
struct G
{
42 char testG
[sizeof(struct G
) == 2 * sizeof(struct A
) ? 1 : -1];
45 __extension__
struct { char z
; };
48 char testH
[sizeof(struct H
) == 2 * sizeof(struct A
) ? 1 : -1];
50 /* Make sure __extension__ gets turned back off. */
52 struct { char z
; }; /* { dg-warning "does not declare anything" } */
55 char testI
[sizeof(struct I
) == sizeof(struct A
) ? 1 : -1];