aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2020-08-27 11:43:08 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2020-08-27 11:43:08 -0700
commit2b4886afdd60106bac617408201e3d5160181dc6 (patch)
tree82a9faf673c5a7dbcbd5cdf5af2d97679a419861 /asm
parent0b7244fcd6ec913e3cd5df03a07ba39e326e15ce (diff)
downloadnasm-2b4886afdd60106bac617408201e3d5160181dc6.tar.gz
nasm-2b4886afdd60106bac617408201e3d5160181dc6.tar.xz
nasm-2b4886afdd60106bac617408201e3d5160181dc6.zip
BR 3392715: fix %ifid with $ and $$
%ifid $ and %ifid $$ has traditionally been false, revert to that behavior. Reported-by: Mike Hommey <mh+anfz@glandium.org> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'asm')
-rw-r--r--asm/preproc.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/asm/preproc.c b/asm/preproc.c
index 3fa4e281..a03e6aba 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -1600,8 +1600,7 @@ static Token *tokenize(const char *line)
/* type = -1; */
}
} else if (p[0] == '$' && p[1] == '$') {
- /* TOKEN_BASE - treat as TOK_ID for pasting purposes */
- type = TOK_ID;
+ type = TOK_OTHER; /* TOKEN_BASE */
p += 2;
} else if (nasm_isnumstart(*p)) {
bool is_hex = false;
@@ -1667,8 +1666,7 @@ static Token *tokenize(const char *line)
p--; /* Point to first character beyond number */
if (p == line+1 && *line == '$') {
- /* TOKEN_HERE - treat as TOK_ID for pasting purposes */
- type = TOK_ID;
+ type = TOK_OTHER; /* TOKEN_HERE */
} else {
if (has_e && !is_hex) {
/* 1e13 is floating-point, but 1e13h is not */