summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.dg/c99-impl-int-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/c99-impl-int-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/c99-impl-int-2.c9
1 files changed, 9 insertions, 0 deletions
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 00000000000..e9e974767d4
--- /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 } */