comparison gcc/testsuite/gcc.dg/Wswitch-enum-3.c @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 /* { dg-do compile } */
2 /* { dg-options "-O2 -Wswitch-enum" } */
3
4 typedef enum { a = 2 } T;
5
6 int main()
7 {
8 switch((T)a) /* { dg-warning "enumeration value 'a' not handled" "a" } */
9 {
10 case 1: /* { dg-warning "case value '1' not in enumerated" "1" } */
11 break;
12 }
13 return 0;
14 }
15