summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2018-12-10 13:29:35 -0800
committerH. Peter Anvin <hpa@zytor.com>2018-12-10 13:29:35 -0800
commitd84f9a71536f0d986da010f69b3cdf53bf223ccc (patch)
treed0ed8683c97455b3f75aa52281882b01983f7f39
parent070c50fe72d79822d1986ba499b5a141dcd38c4d (diff)
downloadnasm-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.c3
-rw-r--r--include/error.h9
2 files changed, 8 insertions, 4 deletions
diff --git a/asm/nasm.c b/asm/nasm.c
index fb205800..fffe0ffd 100644
--- a/asm/nasm.c
+++ b/asm/nasm.c
@@ -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 */