Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/c-c++-common/Wimplicit-fallthrough-11.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
rev | line source |
---|---|
111 | 1 /* PR c/7652 */ |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-Wimplicit-fallthrough -O2" } */ | |
4 | |
5 /* Prevent false positive with optimizations. */ | |
6 | |
7 extern void g (int); | |
8 | |
9 void | |
10 f (int i) | |
11 { | |
12 switch (i) | |
13 { | |
14 case 1: | |
15 if (i > 10) | |
16 g (0); | |
17 else | |
18 goto L; | |
19 break; | |
20 L: | |
21 case 2:; | |
22 } | |
23 } |