PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / c-c++-common / Wimplicit-fallthrough-33.c
blob336cc447e21acdee2f71a1185137421604fcb4f2
1 /* { dg-do compile } */
2 /* { dg-options "-Wno-implicit-fallthrough" } */
4 void bar (int);
6 void
7 foo (int i)
9 switch (i)
11 case 1: /* { dg-bogus "this statement may \[fla\]* through" "" { target *-*-* } .+1 } */
12 bar (1);
13 case 2: /* { dg-bogus "this statement may \[fla\]* through" "" { target *-*-* } .+1 } */
14 bar (2);
15 /* Some comment. */
16 case 3: /* { dg-bogus "this statement may \[fla\]* through" "" { target *-*-* } .+1 } */
17 bar (3);
18 /* Here we really do want to fALl tHRoUgh and we mean it! */
19 case 4: /* { dg-bogus "this statement may \[fla\]* through" "" { target *-*-* } .+1 } */
20 bar (4);
21 /* Intentionally fall through. */
22 case 5: /* { dg-bogus "this statement may \[fla\]* through" "" { target *-*-* } .+1 } */
23 bar (5);
24 /* FALLTHROUGH */
25 case 6: /* { dg-bogus "this statement may \[fla\]* through" "" { target *-*-* } .+1 } */
26 bar (6);
27 __attribute__((fallthrough));
28 case 7: /* { dg-bogus "this statement may \[fla\]* through" "" { target *-*-* } .+1 } */
29 bar (7);
30 default:
31 break;