diff options
author | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-10 16:24:26 +0000 |
---|---|---|
committer | jsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-11-10 16:24:26 +0000 |
commit | 2a1274904a9ddd3db9aba160e2d094090e99bcfd (patch) | |
tree | 99368d90c8e0b51f751a07819e6cdd7a699961c6 /gcc/testsuite/gcc.dg/c99-idem-qual-2.c | |
parent | 1e4ebc0da7ef9dcb5f35a71436c30e0e2877c458 (diff) | |
download | gcc-2a1274904a9ddd3db9aba160e2d094090e99bcfd.tar.gz |
* c-decl.c (grokdeclarator): Make error for duplicate type
qualifiers into a pedwarn, disabled for C99.
testsuite:
* gcc.dg/c90-idem-qual-2.c, gcc.dg/c99-idem-qual-2.c: New tests.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58983 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/testsuite/gcc.dg/c99-idem-qual-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/c99-idem-qual-2.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/c99-idem-qual-2.c b/gcc/testsuite/gcc.dg/c99-idem-qual-2.c new file mode 100644 index 00000000000..dd9f932b979 --- /dev/null +++ b/gcc/testsuite/gcc.dg/c99-idem-qual-2.c @@ -0,0 +1,6 @@ +/* Test for idempotent type qualifiers: in C99 only. Test "const const". */ +/* Origin: Joseph Myers <jsm28@cam.ac.uk> */ +/* { dg-do compile } */ +/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ + +const const int foo; /* { dg-bogus "duplicate" "duplicate type qualifier error" } */ |