☰
Debian Codegraph
@
15:15.3.rel1-2
15:15.3.rel1-1
/
/
gcc
/
testsuite
/
g++.dg
/
warn
/
Wduplicated-branches7.C
☽
☼
gcc/testsuite/g++.dg/warn/Wduplicated-branches7.C
code
plain
raw
1
// PR c++/99565
2
// { dg-do compile }
3
// { dg-options "-Wduplicated-branches" }
4
5
int a;
6
7
void
8
foo (bool x)
9
{
10
x ? ++a : ++a; // { dg-warning "this condition has identical branches" }
11
}