From: Neil Booth Date: Wed, 31 Jan 2001 07:57:12 +0000 (+0000) Subject: * gcc.dg/cpp/tr-warn1.c: Add tests. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2e1911bfad7db7ddc7e0c91fcf4c2901f39fa5b6;p=gcc.git * gcc.dg/cpp/tr-warn1.c: Add tests. From-SVN: r39369 --- diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index c865b936d4c..3cb1be4d249 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2001-01-31 Neil Booth + + * gcc.dg/cpp/tr-warn1.c: Add tests. + 2001-01-31 Neil Booth * gcc.dg/cpp/avoidpaste1.c: Update. diff --git a/gcc/testsuite/gcc.dg/cpp/tr-warn1.c b/gcc/testsuite/gcc.dg/cpp/tr-warn1.c index 2a818309c63..259f9288253 100644 --- a/gcc/testsuite/gcc.dg/cpp/tr-warn1.c +++ b/gcc/testsuite/gcc.dg/cpp/tr-warn1.c @@ -24,6 +24,15 @@ #assert baz(quux) /* { dg-bogus "indented" "^ #ext" } */ # assert quux(weeble) /* { dg-bogus "indented" "^ # ext" } */ +/* We warn of #elif regardless of whether we're skipping or not, and + do not warn about indentaion. */ +#if 0 +#if 1 +#elif 1 /* { dg-warning "#elif" "#elif skipping" } */ +#endif +#elif 0 /* { dg-warning "#elif" "#elif not skipping" } */ +#endif + /* { dg-warning "GCC extension" "extension warning" { target *-*-* } 22 } */ /* { dg-warning "GCC extension" "extension warning" { target *-*-* } 23 } */ /* { dg-warning "GCC extension" "extension warning" { target *-*-* } 24 } */