Update concepts branch to revision 131834
[official-gcc.git] / gcc / testsuite / gcc.dg / compare6.c
blob945d2823955c4b2b2230f5808e5a278b576414a0
1 /* PR c/2098 */
2 /* Test for a warning on comparison on out-of-range data. */
3 /* { dg-do compile } */
4 /* { dg-options "-Wtype-limits" } */
6 signed char sc;
7 unsigned char uc;
9 void foo()
11 if (sc == 10000) return; /* { dg-warning "always false" "signed" } */
12 if (uc == 10000) return; /* { dg-warning "always false" "unsigned" } */