summaryrefslogtreecommitdiffstats
path: root/gcc/testsuite/gcc.dg/va-arg-2.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.dg/va-arg-2.c')
-rw-r--r--gcc/testsuite/gcc.dg/va-arg-2.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.dg/va-arg-2.c b/gcc/testsuite/gcc.dg/va-arg-2.c
new file mode 100644
index 00000000000..2e2849c1528
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/va-arg-2.c
@@ -0,0 +1,12 @@
+/* <varargs.h> is not supported anymore, but we do install a stub
+ file which issues an #error telling the user to convert their code. */
+
+/* { dg-do compile } */
+
+#include <varargs.h> /* { dg-bogus "varargs.h" "missing file" } */
+
+/* { dg-error "" "In file included from" { target *-*-* } 6 } */
+/* { dg-error "no longer implements" "#error 1" { target *-*-* } 4 } */
+/* { dg-error "Revise your code" "#error 2" { target *-*-* } 5 } */
+
+int x; /* prevent empty-source-file warning */
OpenPOWER on IntegriCloud