diff options
author | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-05-20 20:29:55 +0000 |
---|---|---|
committer | manu <manu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-05-20 20:29:55 +0000 |
commit | e6e352cb895ddae21a403a3425c71701717b7637 (patch) | |
tree | 90312ab1a9121fa6e7864a7b15bdaf3260ab1b8b /gcc/testsuite | |
parent | b64b77f22174f1992747752c0d24334ea555bbcd (diff) | |
download | gcc-e6e352cb895ddae21a403a3425c71701717b7637.tar.gz |
2007-05-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org>
PR middle-end/7651
PR c++/11856
PR c/12963
PR c/23587
PR other/29694
* c.opt (Wtype-limits): New.
* doc/invoke.texi (Wtype-limits): Document it.
(Wextra): Enabled by -Wextra.
* c-opts.c (c_common_post_options): Enabled by -Wextra.
* c-common.c (shorten_compare): Warn with Wtype-limits.
testsuite/
* gcc.dg/compare6.c: Replace Wall with Wtype-limits.
* gcc.dg/Wtype-limits.c: New.
* gcc.dg/Wtype-limits-Wextra.c: New.
* gcc.dg/Wtype-limits-no.c: New.
* g++.dg/warn/Wtype-limits.C: New.
* g++.dg/warn/Wtype-limits-Wextra.C: New.
* g++.dg/warn/Wtype-limits-no.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@124875 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 15 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C | 84 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/warn/Wtype-limits-no.C | 84 | ||||
-rw-r--r-- | gcc/testsuite/g++.dg/warn/Wtype-limits.C | 84 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c | 66 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/Wtype-limits-no.c | 66 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/Wtype-limits.c | 66 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/compare6.c | 2 |
8 files changed, 466 insertions, 1 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 0b7b2c0583f..db0a0d5ac95 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,18 @@ +2007-05-20 Manuel Lopez-Ibanez <manu@gcc.gnu.org> + + PR middle-end/7651 + PR c++/11856 + PR c/12963 + PR c/23587 + PR other/29694 + * gcc.dg/compare6.c: Replace Wall with Wtype-limits. + * gcc.dg/Wtype-limits.c: New. + * gcc.dg/Wtype-limits-Wextra.c: New. + * gcc.dg/Wtype-limits-no.c: New. + * g++.dg/warn/Wtype-limits.C: New. + * g++.dg/warn/Wtype-limits-Wextra.C: New. + * g++.dg/warn/Wtype-limits-no.C: New. + 2006-05-20 Uros Bizjak <ubizjak@gmail.com> * gcc.target/i386/sse-vect-types.c: Revert 'Use "-msse" diff --git a/gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C b/gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C new file mode 100644 index 00000000000..9cbdbe54783 --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wtype-limits-Wextra.C @@ -0,0 +1,84 @@ +/* Test that -Wtype-limits is enabled by -Wextra. */ +/* { dg-do compile } */ +/* { dg-options "-Wextra" } */ +extern void assert (int); + +void a (unsigned char x) +{ + if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ + if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ + if (x <= 255) /* { dg-warning "comparison is always true due to limited range of data type" } */ + return; + if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */ + return; + if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 16 } */ + return; + if (255 >= (unsigned char) 1) + return; + +} + +void b (unsigned short x) +{ + if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ + if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ +} + +void c (unsigned int x) +{ + if (x < 0) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (1U >= 0) return; + if (1U < 0) return; + if (0 <= 1U) return; + if (0 > 1U) return; +} + +void d (unsigned long x) +{ + if (x < 0) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ +} + +void e (unsigned long long x) +{ + if (x < 0) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ +} + +int test (int x) +{ + if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 61 } */ + return 1; + else + return 0; +} + +template <typename Int, Int D> +void f(Int x) { + assert(0 <= x and x <= D); // { dg-warning "comparison is always true due to limited range of data type" } +} + +int ff(void) { + f<unsigned char, 2>(5); + f<signed char, 2>(5); +} + +template <typename Int, Int D> +void g(void) { + assert(0 <= D); +} +int gg(void) { + g<unsigned char, 2>(); +} + diff --git a/gcc/testsuite/g++.dg/warn/Wtype-limits-no.C b/gcc/testsuite/g++.dg/warn/Wtype-limits-no.C new file mode 100644 index 00000000000..5040e2657ba --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wtype-limits-no.C @@ -0,0 +1,84 @@ +/* Test disabling -Wtype-limits. */ +/* { dg-do compile } */ +/* { dg-options "-Wextra -Wno-type-limits" } */ +extern void assert (int); + +void a (unsigned char x) +{ + if (x < 0) return;/* { dg-bogus "comparison is always false due to limited range of data type" } */ + if (x >= 0) return;/* { dg-bogus "comparison is always true due to limited range of data type" } */ + if (0 > x) return;/* { dg-bogus "comparison is always false due to limited range of data type" } */ + if (0 <= x) return;/* { dg-bogus "comparison is always true due to limited range of data type" } */ + if (x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" } */ + return; + if (255 >= x) /* { dg-bogus "comparison is always true due to limited range of data type" } */ + return; + if ((int)x <= 255) + return; + if (255 >= (unsigned char) 1) + return; + +} + +void b (unsigned short x) +{ + if (x < 0) return;/* { dg-bogus "comparison is always false due to limited range of data type" } */ + if (x >= 0) return;/* { dg-bogus "comparison is always true due to limited range of data type" } */ + if (0 > x) return;/* { dg-bogus "comparison is always false due to limited range of data type" } */ + if (0 <= x) return;/* { dg-bogus "comparison is always true due to limited range of data type" } */ +} + +void c (unsigned int x) +{ + if (x < 0) return;/* { dg-bogus "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-bogus "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-bogus "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-bogus "comparison of unsigned expression >= 0 is always true" } */ + if (1U >= 0) return; + if (1U < 0) return; + if (0 <= 1U) return; + if (0 > 1U) return; +} + +void d (unsigned long x) +{ + if (x < 0) return;/* { dg-bogus "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-bogus "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-bogus "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-bogus "comparison of unsigned expression >= 0 is always true" } */ +} + +void e (unsigned long long x) +{ + if (x < 0) return;/* { dg-bogus "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-bogus "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-bogus "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-bogus "comparison of unsigned expression >= 0 is always true" } */ +} + +int test (int x) +{ + if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" } */ + return 1; + else + return 0; +} + +template <typename Int, Int D> +void f(Int x) { + assert(0 <= x and x <= D); // { dg-bogus "comparison is always true due to limited range of data type" } +} + +int ff(void) { + f<unsigned char, 2>(5); + f<signed char, 2>(5); +} + +template <typename Int, Int D> +void g(void) { + assert(0 <= D); +} +int gg(void) { + g<unsigned char, 2>(); +} + diff --git a/gcc/testsuite/g++.dg/warn/Wtype-limits.C b/gcc/testsuite/g++.dg/warn/Wtype-limits.C new file mode 100644 index 00000000000..814c2a8826e --- /dev/null +++ b/gcc/testsuite/g++.dg/warn/Wtype-limits.C @@ -0,0 +1,84 @@ +/* { dg-do compile } */ +/* { dg-options "-Wtype-limits" } */ + +extern void assert (int); + +void a (unsigned char x) +{ + if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ + if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ + if (x <= 255) /* { dg-warning "comparison is always true due to limited range of data type" } */ + return; + if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */ + return; + if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 16 } */ + return; + if (255 >= (unsigned char) 1) + return; + +} + +void b (unsigned short x) +{ + if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ + if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ +} + +void c (unsigned int x) +{ + if (x < 0) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (1U >= 0) return; + if (1U < 0) return; + if (0 <= 1U) return; + if (0 > 1U) return; +} + +void d (unsigned long x) +{ + if (x < 0) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ +} + +void e (unsigned long long x) +{ + if (x < 0) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ +} + +int test (int x) +{ + if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 61 } */ + return 1; + else + return 0; +} + +template <typename Int, Int D> +void f(Int x) { + assert(0 <= x and x <= D); // { dg-warning "comparison is always true due to limited range of data type" } +} + +int ff(void) { + f<unsigned char, 2>(5); + f<signed char, 2>(5); +} + +template <typename Int, Int D> +void g(void) { + assert(0 <= D); +} +int gg(void) { + g<unsigned char, 2>(); +} + diff --git a/gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c b/gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c new file mode 100644 index 00000000000..ae13e73ef8b --- /dev/null +++ b/gcc/testsuite/gcc.dg/Wtype-limits-Wextra.c @@ -0,0 +1,66 @@ +/* Test that -Wtype-limits is enabled by -Wextra */ +/* { dg-do compile } */ +/* { dg-options "-Wextra" } */ + + +void a (unsigned char x) +{ + if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ + if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ + if (x <= 255) /* { dg-warning "comparison is always true due to limited range of data type" } */ + return; + if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */ + return; + if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 16 } */ + return; + if (255 >= (unsigned char) 1) + return; + +} + +void b (unsigned short x) +{ + if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ + if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ +} + +void c (unsigned int x) +{ + if (x < 0) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (1U >= 0) return; + if (1U < 0) return; + if (0 <= 1U) return; + if (0 > 1U) return; +} + +void d (unsigned long x) +{ + if (x < 0) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ +} + +void e (unsigned long long x) +{ + if (x < 0) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ +} + +int test (int x) +{ + if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 61 } */ + return 1; + else + return 0; +} + diff --git a/gcc/testsuite/gcc.dg/Wtype-limits-no.c b/gcc/testsuite/gcc.dg/Wtype-limits-no.c new file mode 100644 index 00000000000..2af909abfa6 --- /dev/null +++ b/gcc/testsuite/gcc.dg/Wtype-limits-no.c @@ -0,0 +1,66 @@ +/* Test disabling -Wtype-limits */ +/* { dg-do compile } */ +/* { dg-options "-Wextra -Wno-type-limits" } */ + + +void a (unsigned char x) +{ + if (x < 0) return;/* { dg-bogus "comparison is always false due to limited range of data type" } */ + if (x >= 0) return;/* { dg-bogus "comparison is always true due to limited range of data type" } */ + if (0 > x) return;/* { dg-bogus "comparison is always false due to limited range of data type" } */ + if (0 <= x) return;/* { dg-bogus "comparison is always true due to limited range of data type" } */ + if (x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" } */ + return; + if (255 >= x) /* { dg-bogus "comparison is always true due to limited range of data type" } */ + return; + if ((int)x <= 255) + return; + if (255 >= (unsigned char) 1) + return; + +} + +void b (unsigned short x) +{ + if (x < 0) return;/* { dg-bogus "comparison is always false due to limited range of data type" } */ + if (x >= 0) return;/* { dg-bogus "comparison is always true due to limited range of data type" } */ + if (0 > x) return;/* { dg-bogus "comparison is always false due to limited range of data type" } */ + if (0 <= x) return;/* { dg-bogus "comparison is always true due to limited range of data type" } */ +} + +void c (unsigned int x) +{ + if (x < 0) return;/* { dg-bogus "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-bogus "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-bogus "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-bogus "comparison of unsigned expression >= 0 is always true" } */ + if (1U >= 0) return; + if (1U < 0) return; + if (0 <= 1U) return; + if (0 > 1U) return; +} + +void d (unsigned long x) +{ + if (x < 0) return;/* { dg-bogus "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-bogus "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-bogus "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-bogus "comparison of unsigned expression >= 0 is always true" } */ +} + +void e (unsigned long long x) +{ + if (x < 0) return;/* { dg-bogus "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-bogus "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-bogus "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-bogus "comparison of unsigned expression >= 0 is always true" } */ +} + +int test (int x) +{ + if ((long long)x <= 0x123456789ABCLL) + return 1; + else + return 0; +} + diff --git a/gcc/testsuite/gcc.dg/Wtype-limits.c b/gcc/testsuite/gcc.dg/Wtype-limits.c new file mode 100644 index 00000000000..64e7da61c9a --- /dev/null +++ b/gcc/testsuite/gcc.dg/Wtype-limits.c @@ -0,0 +1,66 @@ +/* { dg-do compile } */ +/* { dg-options "-Wtype-limits" } */ + + + +void a (unsigned char x) +{ + if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ + if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ + if (x <= 255) /* { dg-warning "comparison is always true due to limited range of data type" } */ + return; + if (255 >= x) /* { dg-warning "comparison is always true due to limited range of data type" } */ + return; + if ((int)x <= 255) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 16 } */ + return; + if (255 >= (unsigned char) 1) + return; + +} + +void b (unsigned short x) +{ + if (x < 0) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (x >= 0) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ + if (0 > x) return;/* { dg-warning "comparison is always false due to limited range of data type" } */ + if (0 <= x) return;/* { dg-warning "comparison is always true due to limited range of data type" } */ +} + +void c (unsigned int x) +{ + if (x < 0) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (1U >= 0) return; + if (1U < 0) return; + if (0 <= 1U) return; + if (0 > 1U) return; +} + +void d (unsigned long x) +{ + if (x < 0) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ +} + +void e (unsigned long long x) +{ + if (x < 0) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (x >= 0) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ + if (0 > x) return;/* { dg-warning "comparison of unsigned expression < 0 is always false" } */ + if (0 <= x) return;/* { dg-warning "comparison of unsigned expression >= 0 is always true" } */ +} + +int test (int x) +{ + if ((long long)x <= 0x123456789ABCLL) /* { dg-bogus "comparison is always true due to limited range of data type" "" { xfail *-*-* } 61 } */ + return 1; + else + return 0; +} + diff --git a/gcc/testsuite/gcc.dg/compare6.c b/gcc/testsuite/gcc.dg/compare6.c index fbeb6a0aedd..72f50207b03 100644 --- a/gcc/testsuite/gcc.dg/compare6.c +++ b/gcc/testsuite/gcc.dg/compare6.c @@ -1,7 +1,7 @@ /* PR c/2098 */ /* Test for a warning on comparison on out-of-range data. */ /* { dg-do compile { xfail c4x-*-* } } */ -/* { dg-options "-Wall" } */ +/* { dg-options "-Wtype-limits" } */ signed char sc; unsigned char uc; |