Small ChangeLog tweak.
[official-gcc.git] / gcc / testsuite / gcc.dg / pr60087.c
blob9cdd5897354e1a95ca6630d44355cb756a68f43d
1 /* PR c/60087 */
2 /* { dg-do compile } */
3 /* { dg-options "-Wsign-compare" } */
5 void
6 foo (unsigned int ui, int i)
8 const unsigned char uc = 0;
9 _Bool b;
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 between signed and unsigned integer expressions" } */