]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/testsuite/gcc.dg/c11-enum-5.c
Merge remote-tracking branch 'origin/master' into devel/c++-contracts
[thirdparty/gcc.git] / gcc / testsuite / gcc.dg / c11-enum-5.c
CommitLineData
e0997c14
JM
1/* Test C2x enumerations with fixed underlying type are diagnosed for C11. */
2/* { dg-do compile } */
3/* { dg-options "-std=c11 -pedantic" } */
4
5enum e1 : int; /* { dg-warning "ISO C does not support specifying 'enum' underlying types" } */
6enum e2 : short { A }; /* { dg-warning "ISO C does not support specifying 'enum' underlying types" } */
7enum : short { B }; /* { dg-warning "ISO C does not support specifying 'enum' underlying types" } */