c++: Implement for namespace statics CWG 2867 - Order of initialization for structure...
[official-gcc.git] / gcc / testsuite / gcc.dg / c23-tag-composite-5.c
blob3e4820742f8fdbcc5c222fdc138bb3b85ebf1ec9
1 /* { dg-do compile }
2 * { dg-options "-std=c23" }
3 */
5 // anonymous structs / unions
7 extern struct foo { int (*x)[]; struct { int y; }; } a;
8 extern struct foo { int (*x)[]; struct { int y; }; } a;
9 extern struct bar { int (*x)[]; union { int y; }; } b;
10 extern struct bar { int (*x)[]; union { int y; }; } b;
12 void f(void)
14 struct foo { int (*x)[1]; struct { int y; }; } c;
15 extern typeof(*(1 ? &a : &c)) a;
16 a.y;
18 struct bar { int (*x)[1]; union { int y; }; } d;
19 extern typeof(*(1 ? &b : &d)) b;
20 b.y;
24 struct foo { int (*x)[]; union { int y; }; }; /* { dg-error "redefinition" } */