libcpp, c, middle-end: Optimize initializers using #embed in C
[official-gcc.git] / gcc / testsuite / gcc.dg / c11-enum-4.c
blob12f6c225ca7cd854e6df695ddd86d79283f2bd02
1 /* Test C23 enumerations with fixed underlying type are diagnosed for C11. */
2 /* { dg-do compile } */
3 /* { dg-options "-std=c11 -pedantic-errors" } */
5 enum e1 : int; /* { dg-error "ISO C does not support specifying 'enum' underlying types" } */
6 enum e2 : short { A }; /* { dg-error "ISO C does not support specifying 'enum' underlying types" } */
7 enum : short { B }; /* { dg-error "ISO C does not support specifying 'enum' underlying types" } */