Verify that empty std::vector is optimized away
[official-gcc.git] / gcc / testsuite / c-c++-common / pr61405.c
blobf186926617fc9a08752488555245586942d3088d
1 /* PR c/61405 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wswitch" } */
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;
19 return 3;
22 int
23 fn1 (TS *s)
25 switch (s->e) /* { dg-warning "enumeration value .C. not handled in switch" } */
27 case A:
28 return 1;
29 case B:
30 return 2;
32 return 3;