aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2020-03-22 13:13:17 -0700
committerMichael Forney <mforney@mforney.org>2020-03-22 13:21:20 -0700
commited8f52d4a65d8a06aa01a247eab39e65ec5334e1 (patch)
tree9672a64e6c3d766b746bfb89ea9e6503cfd7aeb9 /test
parentdc17fcc04661f3d8ac5c0e9ba870b9d42979f8da (diff)
downloadcproc-ed8f52d4a65d8a06aa01a247eab39e65ec5334e1.tar.xz
pp: Implement variadic macros
Diffstat (limited to 'test')
-rw-r--r--test/preprocess-macro-vararg.c2
-rw-r--r--test/preprocess-macro-vararg.pp1
2 files changed, 3 insertions, 0 deletions
diff --git a/test/preprocess-macro-vararg.c b/test/preprocess-macro-vararg.c
new file mode 100644
index 0000000..8abdfe8
--- /dev/null
+++ b/test/preprocess-macro-vararg.c
@@ -0,0 +1,2 @@
+#define f(a, ...) __VA_ARGS__ + a, # __VA_ARGS__
+f(abc, 1, (2, 3), 4)
diff --git a/test/preprocess-macro-vararg.pp b/test/preprocess-macro-vararg.pp
new file mode 100644
index 0000000..7dfca22
--- /dev/null
+++ b/test/preprocess-macro-vararg.pp
@@ -0,0 +1 @@
+1, (2, 3), 4 + abc, "1, (2, 3), 4"