[nasm:nasm-2.15.xx] preproc: when printing errors, don't descent into unlisted macros

nasm-bot for H. Peter Anvin hpa at zytor.com
Thu Jul 16 22:54:04 PDT 2020


Commit-ID:  e830e92b7792a3a8c0e81774c0fb6b3414398753
Gitweb:     http://repo.or.cz/w/nasm.git?a=commitdiff;h=e830e92b7792a3a8c0e81774c0fb6b3414398753
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Thu, 16 Jul 2020 22:50:33 -0700
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Thu, 16 Jul 2020 22:50:33 -0700

preproc: when printing errors, don't descent into unlisted macros

If macros are nolisted, *or* they don't have any filename associated
with them, it is absolutely pointless to try to descend into them for
error messages, so just don't, even if -Lb is provided.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 asm/preproc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/asm/preproc.c b/asm/preproc.c
index 2f8fb3cd..fec9520c 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -7046,6 +7046,8 @@ static void pp_error_list_macros(errflags severity)
     severity |= ERR_PP_LISTMACRO | ERR_NO_SEVERITY | ERR_HERE;
 
     while ((m = src_error_down())) {
+        if ((m->nolist & NL_LIST) || !m->where.filename)
+            break;
 	nasm_error(severity, "... from macro `%s' defined", m->name);
     }
 


More information about the Nasm-commits mailing list