From 803dbff03b7c30f276f6b8923b1c6b0a28e7b4f6 Mon Sep 17 00:00:00 2001 From: lemon Date: Tue, 24 Mar 2026 20:13:28 +0100 Subject: cpp: support directives within macro argument list Undefined behavior by the standard but a GNU extension. --- test/07-pp.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'test') diff --git a/test/07-pp.c b/test/07-pp.c index 47fb959..4301dbd 100644 --- a/test/07-pp.c +++ b/test/07-pp.c @@ -14,6 +14,7 @@ token spacing: sum = 1 + 2 +3;$ [ baz] ;$ +. *$ +x=7 */ #include "07-pp.h" @@ -129,5 +130,15 @@ S\ qx2(*) ) "$\n" ); +#define A(x,y) x=y + A(int x, +#if 1 + 7 +#else + 3 +#endif + ); + printf("x=%d\n",x); + CAT(ret,urn) 0; } -- cgit v1.2.3