diff options
Diffstat (limited to 'gcc/testsuite/gcc.dg/declspec-2.c')
-rw-r--r-- | gcc/testsuite/gcc.dg/declspec-2.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/declspec-2.c b/gcc/testsuite/gcc.dg/declspec-2.c new file mode 100644 index 000000000..f2c535ad8 --- /dev/null +++ b/gcc/testsuite/gcc.dg/declspec-2.c @@ -0,0 +1,14 @@ +/* Test declaration specifiers. Test cases that used to be handled in + a loop in grokdeclarator. Pedantic cases. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "-std=gnu89 -pedantic" } */ + +/* These should all be diagnosed, but only once, not for every + identifier declared. */ + +const const int x0, /* { dg-warning "duplicate" } */ +x1; + +long long x2, /* { dg-warning "long long" } */ +x3; |