aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.9/gcc/testsuite/gcc.dg/cpp/trad/macro.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.9/gcc/testsuite/gcc.dg/cpp/trad/macro.c')
-rw-r--r--gcc-4.9/gcc/testsuite/gcc.dg/cpp/trad/macro.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc-4.9/gcc/testsuite/gcc.dg/cpp/trad/macro.c b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/trad/macro.c
new file mode 100644
index 000000000..164b4ecfe
--- /dev/null
+++ b/gcc-4.9/gcc/testsuite/gcc.dg/cpp/trad/macro.c
@@ -0,0 +1,11 @@
+/* Test that varargs are rejected, and that we don't complain about
+ macro args in skipped blocks. */
+
+/* { dg-do preprocess } */
+
+#define f(x)
+#define g(x, y...) /* { dg-error "macro parameter list" } */
+
+#if 0
+#define f(a,b) /* { dg-bogus "passed 2 arguments" } */
+#endif