diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/c90-impl-int-2.c | 8 | ||||
-rw-r--r-- | gcc/testsuite/gcc.dg/c99-impl-int-2.c | 9 |
3 files changed, 21 insertions, 0 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 4e9a48f..93179cd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2000-07-25 Joseph S. Myers <jsm28@cam.ac.uk> + + * gcc.dg/c90-impl-int-2.c, gcc.dg/c99-impl-int-2.c: New tests. + Wed Jul 26 19:41:51 2000 Hans-Peter Nilsson <hp@axis.com> * gcc.c-tortuer/execute/20000726-1.c: New test. diff --git a/gcc/testsuite/gcc.dg/c90-impl-int-2.c b/gcc/testsuite/gcc.dg/c90-impl-int-2.c new file mode 100644 index 0000000..884c9d9 --- /dev/null +++ b/gcc/testsuite/gcc.dg/c90-impl-int-2.c @@ -0,0 +1,8 @@ +/* Test for implicit int: in C90 only. Function parameters in old-style + function definition. +*/ +/* Origin: Joseph Myers <jsm28@cam.ac.uk> */ +/* { dg-do compile } */ +/* { dg-options "-std=iso9899:1990 -pedantic-errors" } */ + +void foo (a) { } diff --git a/gcc/testsuite/gcc.dg/c99-impl-int-2.c b/gcc/testsuite/gcc.dg/c99-impl-int-2.c new file mode 100644 index 0000000..e9e9747 --- /dev/null +++ b/gcc/testsuite/gcc.dg/c99-impl-int-2.c @@ -0,0 +1,9 @@ +/* Test for implicit int: in C90 only. Function parameters in old-style + function definition. +*/ +/* Origin: Joseph Myers <jsm28@cam.ac.uk> */ +/* { dg-do compile } */ +/* { dg-options "-std=iso9899:1999 -pedantic-errors" } */ + +void foo (a) { } /* { dg-bogus "warning" "warning in place of error" } */ +/* { dg-error "defaults" "C99 implicit int parameter error" { target *-*-* } 8 } */ |