Debian Codegraph @

gcc/testsuite/g++.dg/warn/pr8715.C

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