blob: fbeb6a0aedd969da6bd4e1d0fb8d677fc32bc2a1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
/* PR c/2098 */
/* Test for a warning on comparison on out-of-range data. */
/* { dg-do compile { xfail c4x-*-* } } */
/* { dg-options "-Wall" } */
signed char sc;
unsigned char uc;
void foo()
{
if (sc == 10000) return; /* { dg-warning "always false" "signed" } */
if (uc == 10000) return; /* { dg-warning "always false" "unsigned" } */
}
|