aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/noncompile/old-style-parm-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/noncompile/old-style-parm-2.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/noncompile/old-style-parm-2.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/noncompile/old-style-parm-2.c b/gcc-4.9/gcc/testsuite/gcc.dg/noncompile/old-style-parm-2.c
new file mode 100644
index 000000000..1b156b770
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/noncompile/old-style-parm-2.c
@@ -0,0 +1,11 @@
+/* Test that parameter without declaration specifiers in old-style
+ parameters is not accepted. */
+/* Origin: Joseph Myers <joseph@codesourcery.com> */
+/* { dg-do compile } */
+/* { dg-options "" } */
+
+void
+f(a)
+ a; /* { dg-error "parse error|syntax error|no type or storage class|expected declaration specifiers" } */
+{
+}