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:
Michael Matz
2016-10-31 03:59:31 +01:00
parent 3db037387c
commit 3e77bfb6e9
4 changed files with 29 additions and 7 deletions

6
tests/pp/17.expect Normal file
View File

@ -0,0 +1,6 @@
X162 "onetok"
X161 "onetok"
X163 "one##tok"
X170 x ## y
X171 x ## y
X180 return Z(Z(1));