]> matita.cs.unibo.it Git - pkg-cerco/acc.git/blob - tests/GCCTestSuite/compare6.c
Package description and copyright added.
[pkg-cerco/acc.git] / tests / GCCTestSuite / compare6.c
1 /* PR c/2098 */
2 /* Test for a warning on comparison on out-of-range data.  */
3 /* { dg-do compile { xfail c4x-*-* } } */
4 /* { dg-options "-Wall" } */
5
6 signed char sc;
7 unsigned char uc;
8
9 void foo()
10 {
11   if (sc == 10000) return; /* { dg-warning "always false" "signed" } */
12   if (uc == 10000) return; /* { dg-warning "always false" "unsigned" } */
13 }