gcc/testsuite/gcc.dg/c23-enum-8.c
raw| 1 | /* Test C23 enumerations with fixed underlying type. Test -Wc11-c23-compat |
| 2 | warnings. */ |
| 3 | /* { dg-do compile } */ |
| 4 | /* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */ |
| 5 | |
| 6 | enum e1 : int; /* { dg-warning "ISO C does not support specifying 'enum' underlying types before" } */ |
| 7 | enum e2 : short { E2 }; /* { dg-warning "ISO C does not support specifying 'enum' underlying types before" } */ |