* ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
[official-gcc.git] / gcc / testsuite / c-c++-common / pr53874.c
blob153f997c6e901e197f1e545c780bd5d7e46f60c8
1 /* PR c/53874 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wswitch-enum" } */
5 enum E { A, B, C };
6 struct S { enum E e:2; };
7 typedef struct S TS;
9 int
10 fn0 (struct S *s)
12 switch (s->e) /* { dg-warning "enumeration value .C. not handled in switch" } */
14 case A:
15 return 1;
16 case B:
17 return 2;
18 default:
19 return 0;
23 int
24 fn1 (TS *s)
26 switch (s->e) /* { dg-warning "enumeration value .C. not handled in switch" } */
28 case A:
29 return 1;
30 case B:
31 return 2;
32 default:
33 return 0;