2 /* { dg-do compile } */
3 /* { dg-options "-Wsign-compare" } */
6 foo (unsigned int ui
, int i
)
8 const unsigned char uc
= 0;
10 b
= 0 != ~uc
; /* { dg-warning "9:promoted ~unsigned is always non-zero" } */
11 b
= 2 != ~uc
; /* { dg-warning "9:comparison of promoted ~unsigned with constant" } */
12 b
= uc
== ~uc
; /* { dg-warning "10:comparison of promoted ~unsigned with unsigned" } */
13 b
= i
== ui
; /* { dg-warning "9:comparison of integer expressions of different signedness" } */