1 /* Further -Wswitch tests. */
2 /* { dg-do compile } */
3 /* { dg-options "-Wswitch" } */
5 enum e { e1 = 0, e2 = 1, e3 = 1, e4 = 2 };
15 } /* No warning here since e2 has the same value as e3. */
16 switch (ei) /* { dg-warning "enumeration value 'e4' not handled in switch" "enum e4" } */
24 } /* No warning here since switch condition was cast to int. */
25 switch ((enum e) j) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */