[Nasm-bugs] [Bug 3392660] git nasm has "error: macro parameter `%+1' is not a condition code" for valid values
noreply-nasm at dev.nasm.us
noreply-nasm at dev.nasm.us
Sat Apr 18 16:06:46 PDT 2020
https://bugzilla.nasm.us/show_bug.cgi?id=3392660
--- Comment #1 from Chang S. Bae <chang.seok.bae at intel.com> ---
I think there is a glitch checking the parameter number. This change looks to
fix:
diff --git a/asm/preproc.c b/asm/preproc.c
index cf770026..fae3b868 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -4837,7 +4837,7 @@ static Token *expand_mmac_params(Token * tline)
if (unlikely(*ep))
goto invalid;
- if (n && n < mac->nparam) {
+ if (n && n <= mac->nparam) {
n = mmac_rotate(mac, n);
tt = mac->params[n];
}
For the record, the coresspondent patch for this issue is:
commit de7acc3a46cb3da52464d246b814f8bf059a0360
Author: H. Peter Anvin (Intel) <hpa at zytor.com>
Date: Mon Aug 19 17:52:55 2019 -0700
preproc: defer %00, %? and %?? expansion for nested macros, cleanups
BR 3392603: When doing nested macro definitions, we need %00, %? and
%?? expansion to be deferred to actual expansion time, just as the
other parameters.
Do major cleanups to the mmacro expansion code.
Reported-by: Alexandre Audibert <alexandre.audibert at outlook.fr>
Signed-off-by: H. Peter Anvin (Intel) <hpa at zytor.com>
--
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.
More information about the Nasm-bugs
mailing list