2 /* { dg-do compile } */
3 /* { dg-options "-Wswitch-enum" } */
8 foo (int i
, int j
, enum e ei
, enum e ej
, enum e ek
, enum e el
,
9 enum e em
, enum e en
, enum e eo
, enum e ep
)
22 switch (ei
) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */
23 { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } .-1 } */
25 switch (ej
) /* { dg-warning "enumeration value 'e1' not handled in switch" "enum e1" } */
26 { /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" { target *-*-* } .-1 } */
29 switch (ek
) /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" } */
33 switch (el
) /* { dg-warning "enumeration value 'e2' not handled in switch" "enum e2" } */
53 case 3: return 3; /* { dg-warning "case value '3' not in enumerated type 'enum e'" "excess 3" } */
59 case 3: return 3; /* { dg-warning "case value '3' not in enumerated type 'enum e'" "excess 3" } */