0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-08-23 10:33:50 -04:00
nasm/test/weirdpaste.asm
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

15 lines
255 B
NASM

;Testname=preproc; Arguments=-E; Files=stdout stderr
;Testname=bin; Arguments=-fbin -oweirdpaste.bin; Files=stdout stderr weirdpaste.bin
%define foo xyzzy
%define bar 1e+10
%define xyzzy1e 15
%macro dx 2
%assign xx %1%2
dw xx
%endmacro
dx foo, bar