Debian Codegraph @

gcc/testsuite/g++.dg/warn/multiple-sign-compare-warn-1.C

raw
1 // { dg-options "-Wsign-compare" }
2
3 int foo()
4 {
5 unsigned char b = '1';
6
7 bool x = ~b; // { dg-bogus "promoted bitwise complement of an unsigned value is always nonzero.*promoted bitwise complement of an unsigned value is always nonzero" }
8 // { dg-warning "promoted bitwise complement of an unsigned value is always nonzero" "" { target *-*-* } .-1 }
9
10 return 0;
11 }