From 3e77bfb6e9b286bbb53377fb5d7343e58ba34127 Mon Sep 17 00:00:00 2001 From: Michael Matz Date: Mon, 31 Oct 2016 03:59:31 +0100 Subject: tccpp: Fix token pasting See testcase. We must always paste tokens (at least if not currently substing a normal argument, which is a speed optimization only now) but at the same time must not regard a ## token coming from argument expansion as the token-paste operator, nor if we constructed a ## token due to pasting itself (that was already checked by pp/01.c). --- tcc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'tcc.h') diff --git a/tcc.h b/tcc.h index 93544f0..91eeeeb 100644 --- a/tcc.h +++ b/tcc.h @@ -899,6 +899,7 @@ struct filespec { #define TOK_TWOSHARPS 0xca /* ## preprocessing token */ #define TOK_PLCHLDR 0xcb /* placeholder token as defined in C99 */ #define TOK_NOSUBST 0xcc /* means following token has already been pp'd */ +#define TOK_PPJOIN 0xce /* A '##' in the right position to mean pasting */ #define TOK_SHL 0x01 /* shift left */ #define TOK_SAR 0x02 /* signed shift right */ -- cgit v1.3.1