diff options
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/decl-nospec-1.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/decl-nospec-2.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/decl-nospec-3.c | 8 |
4 files changed, 29 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4496f97ce87..5dc3407411b 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2004-10-26 Joseph S. Myers <jsm@polyomino.org.uk> + + * gcc.dg/decl-nospec-1.c, gcc.dg/decl-nospec-2.c, + gcc.dg/decl-nospec-3.c: New tests. + 2004-10-26 Ziemowit Laski <zlaski@apple.com> * objc.dg/super-class-3.m: New test. diff --git a/gcc/testsuite/gcc.dg/decl-nospec-1.c b/gcc/testsuite/gcc.dg/decl-nospec-1.c new file mode 100644 index 00000000000..20067c16594 --- /dev/null +++ b/gcc/testsuite/gcc.dg/decl-nospec-1.c @@ -0,0 +1,8 @@ +/* Data definition with no type or storage class should receive a + pedwarn, rather than a warning which becomes an error with + -pedantic. Test with no options. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "" } */ + +foo(); /* { dg-warning "warning: data definition has no type or storage class" } */ diff --git a/gcc/testsuite/gcc.dg/decl-nospec-2.c b/gcc/testsuite/gcc.dg/decl-nospec-2.c new file mode 100644 index 00000000000..86e68c01be4 --- /dev/null +++ b/gcc/testsuite/gcc.dg/decl-nospec-2.c @@ -0,0 +1,8 @@ +/* Data definition with no type or storage class should receive a + pedwarn, rather than a warning which becomes an error with + -pedantic. Test with -pedantic. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "-pedantic" } */ + +foo(); /* { dg-warning "warning: data definition has no type or storage class" } */ diff --git a/gcc/testsuite/gcc.dg/decl-nospec-3.c b/gcc/testsuite/gcc.dg/decl-nospec-3.c new file mode 100644 index 00000000000..6c04e94429d --- /dev/null +++ b/gcc/testsuite/gcc.dg/decl-nospec-3.c @@ -0,0 +1,8 @@ +/* Data definition with no type or storage class should receive a + pedwarn, rather than a warning which becomes an error with + -pedantic. Test with -pedantic-errors. */ +/* Origin: Joseph Myers <jsm@polyomino.org.uk> */ +/* { dg-do compile } */ +/* { dg-options "-pedantic-errors" } */ + +foo(); /* { dg-error "error: data definition has no type or storage class" } */ |