diff options
author | H. Peter Anvin <hpa@zytor.com> | 2019-08-27 16:38:48 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2019-08-27 16:42:41 -0700 |
commit | d235408c65fc8176fdd94dd9f7d49074828bfa86 (patch) | |
tree | 1c1813452456e38e4af96a9046b96ac0e4b43998 /asm/tokens.dat | |
parent | eaef851689e1d83608741cd5ac7c65e4e47d4acb (diff) | |
download | nasm-d235408c65fc8176fdd94dd9f7d49074828bfa86.tar.gz |
preproc: standard macros now C-safe, %aliases off, fix %? recursion
Enough users expect the namespace starting with underscore to be safe
for symbols. Change our private namespace from __foo__ to
__?foo?__. Use %defalias to provide backwards compatiblity (by using
%defalias instead of %define, we handle the case properly where the
user changes the value.)
Add a preprocessor directive:
%aliases off
... to disable all smacro aliases and thereby making the namespace
clean.
Finally, fix infinite recursion when seeing %? or %?? due to
paste_tokens(). If we don't paste anything, the expansion is done.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'asm/tokens.dat')
-rw-r--r-- | asm/tokens.dat | 62 |
1 files changed, 31 insertions, 31 deletions
diff --git a/asm/tokens.dat b/asm/tokens.dat index d75640cf..ad26420d 100644 --- a/asm/tokens.dat +++ b/asm/tokens.dat @@ -92,42 +92,42 @@ to ptr % TOKEN_FLOAT, 0, 0, 0 -__infinity__ -__nan__ -__qnan__ -__snan__ - -% TOKEN_FLOATIZE, 0, 0, FLOAT_{__float*__} -__float8__ -__float16__ -__float32__ -__float64__ -__float80m__ -__float80e__ -__float128l__ -__float128h__ - -% TOKEN_STRFUNC, 0, 0, STRFUNC_{__*__} -__utf16__ -__utf16le__ -__utf16be__ -__utf32__ -__utf32le__ -__utf32be__ - -% TOKEN_IFUNC, 0, 0, IFUNC_{__*__} -__ilog2e__ -__ilog2w__ -__ilog2f__ -__ilog2c__ +__?infinity?__ +__?nan?__ +__?qnan?__ +__?snan?__ + +% TOKEN_FLOATIZE, 0, 0, FLOAT_{__?float*?__} +__?float8?__ +__?float16?__ +__?float32?__ +__?float64?__ +__?float80m?__ +__?float80e?__ +__?float128l?__ +__?float128h?__ + +% TOKEN_STRFUNC, 0, 0, STRFUNC_{__?*?__} +__?utf16?__ +__?utf16le?__ +__?utf16be?__ +__?utf32?__ +__?utf32le?__ +__?utf32be?__ + +% TOKEN_IFUNC, 0, 0, IFUNC_{__?*?__} +__?ilog2e?__ +__?ilog2w?__ +__?ilog2f?__ +__?ilog2c?__ % TOKEN_*, 0, 0, 0 seg wrt -% TOKEN_{__*__}, 0, 0, 0 -__masm_ptr__ -__masm_flat__ +% TOKEN_{__?*?__}, 0, 0, 0 +__?masm_ptr?__ +__?masm_flat?__ % TOKEN_DECORATOR, 0, TFLAG_BRC | TFLAG_BRDCAST , BRC_1TO{1to*} 1to2 |