[nasm:nasm-2.15.xx] preproc: %ifdef needs to accept any argument count
nasm-bot for H. Peter Anvin (Intel)
hpa at zytor.com
Fri Jun 5 12:24:04 PDT 2020
Commit-ID: b91e77361ade0fd2fe23c7a891465c8babb03554
Gitweb: http://repo.or.cz/w/nasm.git?a=commitdiff;h=b91e77361ade0fd2fe23c7a891465c8babb03554
Author: H. Peter Anvin (Intel) <hpa at zytor.com>
AuthorDate: Fri, 5 Jun 2020 12:22:26 -0700
Committer: H. Peter Anvin (Intel) <hpa at zytor.com>
CommitDate: Fri, 5 Jun 2020 12:22:26 -0700
preproc: %ifdef needs to accept any argument count
%ifdef should accept any argument count. However, requiring
a macro structure return means we have to use the wildcard
argument number (-1), not 0 meaning exactly 0 arguments.
Signed-off-by: H. Peter Anvin (Intel) <hpa at zytor.com>
---
asm/preproc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/asm/preproc.c b/asm/preproc.c
index 793df558..0080432f 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -2458,7 +2458,7 @@ static enum cond_state if_condition(Token * tline, enum preproc_token ct)
mname = tok_text(tline);
ctx = get_ctx(mname, &mname);
- if (smacro_defined(ctx, mname, 0, &smac, true, alias) && smac
+ if (smacro_defined(ctx, mname, -1, &smac, true, alias) && smac
&& smac->alias == alias) {
j = true;
break;
More information about the Nasm-commits
mailing list