Commit Graph

3 Commits

Author SHA1 Message Date
H. Peter Anvin
d784a083a3 preproc: unify token-pasting code
Unify the token-pasting code between the macro expansion and the
preprocessor parameter case.  Parameterize whether or not to handle %+
tokens during expansion (%+ tokens have late binding semantics.)

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2009-04-20 14:01:18 -07:00
H. Peter Anvin
6125b62403 preproc: fix more token pasting cases
"+" can be a separate token that ends up having to get pulled into the
middle of a floating-point constant.  It's not even that strange.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-04-08 14:02:25 -07:00
H. Peter Anvin
9bb46df4b7 Handle weird cases of token pasting
Especially when token pasting involves floating-point numbers, we can
have some really strange effects from token pasting: for example,
pasting the two tokens "xyzzy" and "1e+10" ends up with *three*
tokens: "xyzzy1e" "+" "10".  The easiest way to deal with this is to
explicitly combine the string and then run tokenize() on it.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2009-04-07 21:59:24 -07:00