aboutsummaryrefslogtreecommitdiff
path: root/tcc.h
diff options
context:
space:
mode:
authorMichael Matz <matz@suse.de>2016-10-31 03:59:31 +0100
committerMichael Matz <matz@suse.de>2016-12-15 17:49:56 +0100
commit3e77bfb6e9b286bbb53377fb5d7343e58ba34127 (patch)
treef8798307b10322c629c01217dafb36b3ab013a84 /tcc.h
parent3db037387c16c7e582f76167d32d5c29ac32fb15 (diff)
downloadtinycc-3e77bfb6e9b286bbb53377fb5d7343e58ba34127.tar.gz
tinycc-3e77bfb6e9b286bbb53377fb5d7343e58ba34127.tar.bz2
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).
Diffstat (limited to 'tcc.h')
-rw-r--r--tcc.h1
1 files changed, 1 insertions, 0 deletions
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 */