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).
This commit is contained in:
1
tcc.h
1
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 */
|
||||
|
||||
Reference in New Issue
Block a user