Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/gcc.dg/Wimplicit-fallthrough-1.c @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
111 | 1 /* PR c/7652 */ |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-Wimplicit-fallthrough -Wdeclaration-after-statement" } */ | |
4 | |
5 /* Test we don't print bogus "mixed declarations and code" warning. */ | |
6 | |
7 int | |
8 f (int b) | |
9 { | |
10 switch (b) | |
11 { | |
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; | |
20 } | |
21 return 99; | |
22 } |