libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / gnu23-tag-enum-1.c
blobecf4d5e2bf7e8acd13465d15abb0097b40e74a33
1 /*
2 * { dg-do compile }
3 * { dg-options "-std=gnu23" }
4 */
8 void test2(void)
10 enum ee *a;
11 enum ee { F = 2 } *b;
12 b = a;
17 enum A { B = 7 } y;
19 void g(void)
21 // incomplete during construction
22 // this is a GNU extension because enum A is used
23 // before the type is completed.
25 enum A { B = _Generic(&y, enum A*: 1, default: 7) };
26 _Static_assert(7 == B, "");