Warn pointer to signed integer cast for ilp32
[official-gcc.git] / gcc / testsuite / gcc.dg / c1x-anon-struct-3.c
blob1841eddd0a18bf5eda1f5ccd0f0e00a2b76db807
1 /* Test for anonymous structures and unions in C1X. Test for invalid
2 cases: typedefs disallowed by N1549. */
3 /* { dg-do compile } */
4 /* { dg-options "-std=c1x -pedantic-errors" } */
6 typedef struct
8 int i;
9 } s0;
11 typedef union
13 int i;
14 } u0;
16 struct s1
18 int a;
19 u0; /* { dg-error "declaration does not declare anything" } */
20 struct
22 int b;
26 union u1
28 int b;
29 s0; /* { dg-error "declaration does not declare anything" } */
30 union
32 int c;