aboutsummaryrefslogtreecommitdiffstats
path: root/asm/preproc.c
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-12-11 00:06:29 -0800
committerH. Peter Anvin (Intel) <hpa@zytor.com>2018-12-12 17:43:25 -0800
commite2f5edbb3a24db347e4f52cdf134402ab987b085 (patch)
tree2e1e18e6565a531b39f88b767d8d8a81f555a3ea /asm/preproc.c
parentc0b32a36503e5dd3e109c8c2b40a8c2081111430 (diff)
downloadnasm-e2f5edbb3a24db347e4f52cdf134402ab987b085.tar.gz
nasm-e2f5edbb3a24db347e4f52cdf134402ab987b085.tar.xz
nasm-e2f5edbb3a24db347e4f52cdf134402ab987b085.zip
error: new flag ERR_HERE
ERR_HERE is used to mark messages of the form "... here" so that we can emit sane output to the list file with filename and line number, instead of a nonsensical "here" which could point almost anywhere. This patch contains some changes from the one in the master branch to make the code cleaner. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'asm/preproc.c')
-rw-r--r--asm/preproc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/asm/preproc.c b/asm/preproc.c
index 3b8de02b..b134414a 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -5451,7 +5451,7 @@ static void pp_list_one_macro(MMacro *m, int severity)
if (m->name && !m->nolist) {
src_set(m->xline + m->lineno, m->fname);
- nasm_error(severity, "... from macro `%s' defined here", m->name);
+ nasm_error(severity, "... from macro `%s' defined", m->name);
}
}
@@ -5460,7 +5460,7 @@ static void pp_error_list_macros(int severity)
int32_t saved_line;
const char *saved_fname = NULL;
- severity |= ERR_PP_LISTMACRO | ERR_NO_SEVERITY;
+ severity |= ERR_PP_LISTMACRO | ERR_NO_SEVERITY | ERR_HERE;
src_get(&saved_line, &saved_fname);
if (istk)