gcc/testsuite/gcc.dg/c11-enum-4.c
raw| 1 | /* Test C23 enumerations with fixed underlying type are diagnosed for C11. */ |
| 2 | /* { dg-do compile } */ |
| 3 | /* { dg-options "-std=c11 -pedantic-errors" } */ |
| 4 | |
| 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" } */ |