gcc/
[official-gcc.git] / gcc / testsuite / gcc.dg / enum3.c
blobeebd6ca64c1d54765e5280162ef889a1e0c8ba62
1 /* Test for non-integer enum values. */
2 /* Origin: Joseph Myers <joseph@codesourcery.com> */
3 /* { dg-do compile } */
4 /* { dg-options "" } */
6 enum e { E, F };
7 enum e2 {
8 E1 = (void *)4, /* { dg-error "enumerator value for 'E1' is not an integer constant" } */
9 E2 = (enum e)F,
10 E3 = (_Bool)1