PR middle-end/85602 - -Wsizeof-pointer-memaccess for strncat with size of source
[official-gcc.git] / gcc / testsuite / gcc.dg / Wimplicit-fallthrough-1.c
blobf8b54f5237b4a1d28da8215ff25a0c0c377b7bcf
1 /* PR c/7652 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wimplicit-fallthrough -Wdeclaration-after-statement" } */
5 /* Test we don't print bogus "mixed declarations and code" warning. */
7 int
8 f (int b)
10 switch (b)
12 case 0:
13 b++;
14 __attribute__((fallthrough));
15 case 1:
16 b--;
17 __attribute__((unused)) int a; /* { dg-warning "mixed declarations and code" } */
18 case 2:
19 break;
21 return 99;