* ubsan.c (ubsan_expand_null_ifn): Use _v1 suffixed type mismatch
[official-gcc.git] / gcc / testsuite / c-c++-common / Wimplicit-fallthrough-13.c
blobf3ec79f975663de511ad4d799f16ced47a66d590
1 /* PR c/7652 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wimplicit-fallthrough" } */
5 /* As per <http://security.coverity.com/blog/2013/Sep/gimme-a-break.html>, don't
6 warn for terminated branches (fall through to break / end of the switch). */
8 extern void bar (int);
10 void
11 f (int i)
13 switch (i)
15 case 1:
16 bar (1);
17 default:
18 return;
21 switch (i)
23 case 1:
24 bar (1);
25 default:
26 goto X;
30 switch (i)
32 case 1:
33 bar (1);
34 default:
35 break;
38 switch (i)
40 case 1:
41 bar (1);
42 case 2:
43 case 3:
44 default:
45 break;
48 switch (i)
50 case 1:
51 bar (1);
52 default:;
55 switch (i)
57 case 1:
58 bar (1);
59 case 2:
60 case 3:
61 default:;