OSDN Git Service

* gcc.dg/c90-impl-int-2.c, gcc.dg/c99-impl-int-2.c: New tests.
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Jul 2000 15:39:08 +0000 (15:39 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 27 Jul 2000 15:39:08 +0000 (15:39 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35291 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/c90-impl-int-2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/c99-impl-int-2.c [new file with mode: 0644]

index 4e9a48f..93179cd 100644 (file)
@@ -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 (file)
index 0000000..884c9d9
--- /dev/null
@@ -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 (file)
index 0000000..e9e9747
--- /dev/null
@@ -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 } */