diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-06-27 22:03:01 -0700 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-06-27 22:03:01 -0700 |
commit | 42b9579f90d26d2123036cbab9ca8c20226423d3 (patch) | |
tree | 9a7289664befc903f709e7a0be2660061a3121fd /asm/preproc.c | |
parent | 4431b268ae7e36096f5ab20bfab0d448ab49f5a3 (diff) | |
download | nasm-note.tar.gz |
preproc: add new %note directivenote
Add a new %note directive to issue a note into the list file without
printing a message. The difference between %note and a comment is that
a %note will be issued with single-line macros expanded, and will be
issued even if it occurs inside a .nolist macro.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'asm/preproc.c')
-rw-r--r-- | asm/preproc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/asm/preproc.c b/asm/preproc.c index 8e1e6369..0a6e0fa6 100644 --- a/asm/preproc.c +++ b/asm/preproc.c @@ -2735,6 +2735,9 @@ static int do_directive(Token *tline, char **output) case PP_WARNING: severity = ERR_WARNING|ERR_WARN_USER; goto issue_error; + case PP_NOTE: + severity = ERR_NOTE; + goto issue_error; issue_error: { @@ -2759,6 +2762,10 @@ issue_error: nasm_free(p); } free_tlist(origline); + + if (severity == ERR_NOTE) + lfmt->drop(); /* Suppress printing the actual %note */ + return DIRECTIVE_FOUND; } |