aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c11-enum-5.c
blob: 91d681f21fefdb3a4693897c4d3f10d61e69ea2b (plain)
1
2
3
4
5
6
7
/* Test C2x enumerations with fixed underlying type are diagnosed for C11.  */
/* { dg-do compile } */
/* { dg-options "-std=c11 -pedantic" } */

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