summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2018-12-12 16:49:07 -0800
committerH. Peter Anvin (Intel) <hpa@zytor.com>2018-12-12 16:49:07 -0800
commit950dee9edc475ae37d80e88b7048b8ff01d49a5f (patch)
tree9d19d3115dccc7ac9b5764ed35db307df11f6dee /include
parent46016cb3688bf8582f47967e09b06b69ea271e75 (diff)
downloadnasm-950dee9edc475ae37d80e88b7048b8ff01d49a5f.tar.gz
BR 3392535: warning on redefine, promote define-on-pass2 to error
If we redefine consistently, make it a suppressed-by-default warning. If we end up doing the define on pass 2, promote that to a default-error warning; using a default-error warning allows the user to demote it should they so wish. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com> Requested-by: C. Masloch <pushbx@38.de>
Diffstat (limited to 'include')
-rw-r--r--include/error.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/error.h b/include/error.h
index cd64a497..3d2b7a1a 100644
--- a/include/error.h
+++ b/include/error.h
@@ -95,8 +95,7 @@ static inline vefunc nasm_set_verror(vefunc ve)
#define WARN_MNP WARN( 1) /* macro-num-parameters warning */
#define WARN_MSR WARN( 2) /* macro self-reference */
#define WARN_MDP WARN( 3) /* macro default parameters check */
-#define WARN_OL WARN( 4) /* orphan label (no colon, and
- * alone on line) */
+#define WARN_OL WARN( 4) /* orphan label (no colon, and alone on line) */
#define WARN_NOV WARN( 5) /* numeric overflow */
#define WARN_GNUELF WARN( 6) /* using GNU ELF extensions */
#define WARN_FL_OVERFLOW WARN( 7) /* FP overflow */
@@ -115,9 +114,11 @@ static inline vefunc nasm_set_verror(vefunc ve)
#define WARN_UNK_WARNING WARN(20) /* unknown warning */
#define WARN_NEG_REP WARN(21) /* negative repeat count */
#define WARN_PHASE WARN(22) /* phase error in pass 1 */
+#define WARN_LABEL_REDEF WARN(23) /* label redefined, but consistent */
+#define WARN_LABEL_LATE WARN(24) /* label (re)defined during code generation */
/* These two should come last */
-#define WARN_ALL (22+2) /* Do not use WARN() here */
+#define WARN_ALL (24+2) /* Do not use WARN() here */
#define WARN_OTHER WARN(WARN_ALL-1) /* any noncategorized warning */
/* This is a bitmask */