Mercurial > hg > CbC > CbC_gcc
comparison gcc/testsuite/c-c++-common/Wdangling-else-1.c @ 111:04ced10e8804
gcc 7
author | kono |
---|---|
date | Fri, 27 Oct 2017 22:46:09 +0900 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
68:561a7518be6b | 111:04ced10e8804 |
---|---|
1 /* { dg-do compile } */ | |
2 /* { dg-options "-Wdangling-else" } */ | |
3 | |
4 void bar (int); | |
5 void | |
6 foo (int a, int b) | |
7 { | |
8 if (a) /* { dg-warning "suggest explicit braces to avoid ambiguous" } */ | |
9 if (b) | |
10 bar (1); | |
11 else | |
12 bar (2); | |
13 } |