From ed8f52d4a65d8a06aa01a247eab39e65ec5334e1 Mon Sep 17 00:00:00 2001 From: Michael Forney <mforney@mforney.org> Date: Sun, 22 Mar 2020 13:13:17 -0700 Subject: pp: Implement variadic macros --- test/preprocess-macro-vararg.c | 2 ++ test/preprocess-macro-vararg.pp | 1 + 2 files changed, 3 insertions(+) create mode 100644 test/preprocess-macro-vararg.c create mode 100644 test/preprocess-macro-vararg.pp (limited to 'test') 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" -- cgit v1.2.3