Debian Codegraph @

gcc/testsuite/g++.dg/warn/Wduplicated-branches7.C

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 }