diff options
author | Kazu Hirata <kazu@codesourcery.com> | 2005-07-05 00:47:25 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2005-07-05 00:47:25 +0000 |
commit | 5935bec3911e7298de163f4cb576c4d9abddfd53 (patch) | |
tree | 28323018e09ca398cf4003532a9bc795bd96c316 /gcc | |
parent | 4e89ef6bb4a975089b255edc643ae950a16259b2 (diff) | |
download | gcc-5935bec3911e7298de163f4cb576c4d9abddfd53.zip gcc-5935bec3911e7298de163f4cb576c4d9abddfd53.tar.gz gcc-5935bec3911e7298de163f4cb576c4d9abddfd53.tar.bz2 |
compare1.c: Add -fno-short-enums.
* gcc.dg/compare1.c: Add -fno-short-enums. Don't skip on any
target.
* gcc.dg/compare9.c: Use -fshort-enums instead of
-fshort-enums. Change the last test to dg-bogus.
From-SVN: r101610
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/compare1.c | 9 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/compare9.c | 9 |
3 files changed, 15 insertions, 10 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1f18a29..4805a76 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,10 @@ +2005-07-05 Kazu Hirata <kazu@codesourcery.com> + + * gcc.dg/compare1.c: Add -fno-short-enums. Don't skip on any + target. + * gcc.dg/compare9.c: Use -fshort-enums instead of + -fshort-enums. Change the last test to dg-bogus. + 2005-07-04 Kazu Hirata <kazu@codesourcery.com> * gcc.dg/compare1.c: Skip on arm*-*-eabi* arm*-*-symbianelf*. diff --git a/gcc/testsuite/gcc.dg/compare1.c b/gcc/testsuite/gcc.dg/compare1.c index 0604927..17ba3ee 100644 --- a/gcc/testsuite/gcc.dg/compare1.c +++ b/gcc/testsuite/gcc.dg/compare1.c @@ -1,11 +1,10 @@ /* Test for a bogus warning on comparison between signed and unsigned. - This was inspired by code in gcc. */ + This was inspired by code in gcc. This testcase is identical to + compare9.c except that we use -fno-short-enums here and expect a + warning from case 4. */ /* { dg-do compile } */ -/* { dg-options "-Wsign-compare" } */ -/* This test would fail on targets with short enums being default. See - compare9.c. */ -/* { dg-skip-if "" { arm*-*-eabi* arm*-*-symbianelf* } { "*" } { "" } } */ +/* { dg-options "-fno-short-enums -Wsign-compare" } */ int tf = 1; diff --git a/gcc/testsuite/gcc.dg/compare9.c b/gcc/testsuite/gcc.dg/compare9.c index e46e064..02150cb 100644 --- a/gcc/testsuite/gcc.dg/compare9.c +++ b/gcc/testsuite/gcc.dg/compare9.c @@ -1,11 +1,10 @@ /* Test for a bogus warning on comparison between signed and unsigned. This was inspired by code in gcc. This testcase is identical to - compare1.c except that we add -fno-short-enums to accomodate - targets with short enums being default, such as arm*-*-eabi* and - arm*-*-symbianelf*. */ + compare1.c except that we use -fshort-enums here and do not expect + a warning from case 4. */ /* { dg-do compile } */ -/* { dg-options "-fno-short-enums -Wsign-compare" } */ +/* { dg-options "-fshort-enums -Wsign-compare" } */ int tf = 1; @@ -38,5 +37,5 @@ int h(enum mm2 x) int i(enum mm2 x) { - return x == (tf?DI2:-1); /* { dg-warning "signed and unsigned" "case 4" } */ + return x == (tf?DI2:-1); /* { dg-bogus "signed and unsigned" "case 4" } */ } |