PR tree-optimization/81303
[official-gcc.git] / gcc / testsuite / gcc.dg / Wswitch-enum-3.c
blob98db4d578f151544e9d568fe088337c08ac25063
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wswitch-enum" } */
4 typedef enum { a = 2 } T;
6 int main()
8 switch((T)a) /* { dg-warning "enumeration value 'a' not handled" "a" } */
10 case 1: /* { dg-warning "case value '1' not in enumerated" "1" } */
11 break;
13 return 0;