aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/old-style-prom-3.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/old-style-prom-3.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/old-style-prom-3.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/old-style-prom-3.c b/gcc-4.9/gcc/testsuite/gcc.dg/old-style-prom-3.c
new file mode 100644
index 000000000..720367f2e
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/old-style-prom-3.c
@@ -0,0 +1,14 @@
+/* Test for prototype followed by old-style definition, as in
+ dremf-type-compat-3.c but with a non-built-in function. */
+/* { dg-do compile } */
+/* { dg-options "-pedantic-errors" } */
+
+float f (float, float); /* { dg-error "prototype declaration" } */
+
+float
+f (x, y)
+ float x; /* { dg-error "promoted argument 'x' doesn't match prototype" } */
+ float y; /* { dg-error "promoted argument 'y' doesn't match prototype" } */
+{
+ return x + y;
+}