Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/c-c++-common/Wduplicated-branches-5.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/64279 */ |
2 /* { dg-do compile } */ | |
3 /* { dg-options "-Wduplicated-branches" } */ | |
4 | |
5 extern int g; | |
6 extern void foo (); | |
7 #define A g = i | |
8 #define B g = i | |
9 #define DOIT() foo() | |
10 #define DOIT2() foo() | |
11 | |
12 void | |
13 f (int i) | |
14 { | |
15 if (i == 0) | |
16 A; | |
17 else | |
18 B; | |
19 | |
20 if (i == 1) | |
21 DOIT(); | |
22 else | |
23 DOIT2(); | |
24 } |