diff options
author | Phil Edwards <pme@gcc.gnu.org> | 2002-03-22 21:44:30 +0000 |
---|---|---|
committer | Phil Edwards <pme@gcc.gnu.org> | 2002-03-22 21:44:30 +0000 |
commit | 4299b4e14e26a0c74563843b627ff707d7be0406 (patch) | |
tree | 2715e8388f569ee545269b9c7c7d0dd9915b0b73 | |
parent | d8bf17f9d631136c88cbfd35203a4cd3e64b6fc7 (diff) | |
download | gcc-4299b4e14e26a0c74563843b627ff707d7be0406.zip gcc-4299b4e14e26a0c74563843b627ff707d7be0406.tar.gz gcc-4299b4e14e26a0c74563843b627ff707d7be0406.tar.bz2 |
extratokens2.c: New file.
2002-03-22 Phil Edwards <pme@gcc.gnu.org>
* gcc.dg/cpp/extratokens2.c: New file.
From-SVN: r51188
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/cpp/extratokens2.c | 22 |
2 files changed, 26 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 1be42be..06b2c01 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2002-03-22 Phil Edwards <pme@gcc.gnu.org> + + * gcc.dg/cpp/extratokens2.c: New file. + 2002-03-21 David Edelsohn <edelsohn@gnu.org> * gcc.dg/20020312-2.c: Add rs6000 target. diff --git a/gcc/testsuite/gcc.dg/cpp/extratokens2.c b/gcc/testsuite/gcc.dg/cpp/extratokens2.c new file mode 100644 index 0000000..fe682bf --- /dev/null +++ b/gcc/testsuite/gcc.dg/cpp/extratokens2.c @@ -0,0 +1,22 @@ +/* Copyright (C) 2002 Free Software Foundation, Inc. */ + +/* { dg-do preprocess } */ +/* { dg-options "-fno-show-column -Wno-endif-labels" } */ + +/* Tests that -Wno-endif-labels correctly disables the checks done by + default (and tested in extratokens.c). */ + +/* Source: Phil Edwards, 21 Mar 2002. Copied from extratokens.c and + modified. */ + +#if 1 +#if 0 +#else foo /* { dg-bogus "extra tokens" "bad warning" } */ +#endif / /* { dg-bogus "extra tokens" "bad warning" } */ +#endif + +# 36 "file.c" 3 + +/* ... but in a system header, it's acceptable. */ +#ifdef KERNEL +#endif KERNEL /* { dg-bogus "extra tokens" "bad warning" } */ |