aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c23-enum-8.c
blob: a241a3f454f7c5877284c05888d84a33d23cc70c (plain)
1
2
3
4
5
6
7
/* Test C23 enumerations with fixed underlying type.  Test -Wc11-c23-compat
   warnings.  */
/* { dg-do compile } */
/* { dg-options "-std=c23 -pedantic-errors -Wc11-c23-compat" } */

enum e1 : int; /* { dg-warning "ISO C does not support specifying 'enum' underlying types before" } */
enum e2 : short { E2 }; /* { dg-warning "ISO C does not support specifying 'enum' underlying types before" } */