tinycc/tests/pp/22.c
Michael Matz 64f4b00d34 tccpp: Fix #ifdef in macro args
see testcase.  We have to "empty" the macro-stack string on
end_macro, as it may be 'tokstr_buf' which is going to be used
twice in recursive invocations of macro_subst_tok.  The uses aren't
overlapping but the first one needs to be properly finalized.
2022-08-16 15:59:41 +02:00

13 lines
170 B
C

#define TRACE(a,b,c) X a X b X c X
#define rettrue(x) 1
A rettrue(bla) B
TRACE(
ARG_1,
#if rettrue(bla)
ARG_2,
#else
ARG_2_wrong,
#endif
ARG_3
);