diff options
author | H. Peter Anvin <hpa@zytor.com> | 2018-12-10 13:29:35 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2018-12-10 13:29:35 -0800 |
commit | d84f9a71536f0d986da010f69b3cdf53bf223ccc (patch) | |
tree | d0ed8683c97455b3f75aa52281882b01983f7f39 | |
parent | 070c50fe72d79822d1986ba499b5a141dcd38c4d (diff) | |
download | nasm-d84f9a71536f0d986da010f69b3cdf53bf223ccc.tar.gz |
error: add new severity level "note"
Add a new severity level "note", intended to be used to give
additional information about a previous error.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
-rw-r--r-- | asm/nasm.c | 3 | ||||
-rw-r--r-- | include/error.h | 9 |
2 files changed, 8 insertions, 4 deletions
@@ -1873,6 +1873,9 @@ static void nasm_verror_common(int severity, const char *fmt, va_list args) bool warn_is_other = WARN_IDX(severity) == ERR_WARN_OTHER; switch (severity & (ERR_MASK|ERR_NO_SEVERITY)) { + case ERR_NOTE: + pfx = "note: "; + break; case ERR_WARNING: if (!warn_is_err) { pfx = "warning: "; diff --git a/include/error.h b/include/error.h index 139400db..f7e38af3 100644 --- a/include/error.h +++ b/include/error.h @@ -64,8 +64,9 @@ static inline vefunc nasm_set_verror(vefunc ve) */ #define ERR_DEBUG 0x00000000 /* put out debugging message */ -#define ERR_WARNING 0x00000001 /* warn only: no further action */ -#define ERR_NONFATAL 0x00000002 /* terminate assembly after phase */ +#define ERR_NOTE 0x00000001 /* additional error information */ +#define ERR_WARNING 0x00000002 /* warn only: no further action */ +#define ERR_NONFATAL 0x00000003 /* terminate assembly after phase */ #define ERR_FATAL 0x00000006 /* instantly fatal: exit with error */ #define ERR_PANIC 0x00000007 /* internal error: panic instantly * and dump core for reference */ @@ -73,8 +74,8 @@ static inline vefunc nasm_set_verror(vefunc ve) #define ERR_NOFILE 0x00000010 /* don't give source file name/line */ #define ERR_TOPFILE 0x00000020 /* give the top input file name only */ #define ERR_USAGE 0x00000040 /* print a usage message */ -#define ERR_PASS1 0x00000080 /* only print this error on pass one */ -#define ERR_PASS2 0x00000100 /* only print this error on pass one */ +#define ERR_PASS1 0x00000080 /* only print this error on pass 1 */ +#define ERR_PASS2 0x00000100 /* only print this error on pass 2 */ #define ERR_NO_SEVERITY 0x00000200 /* suppress printing severity */ #define ERR_PP_PRECOND 0x00000400 /* for preprocessor use */ |