diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-14 13:44:35 -0800 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-14 13:44:35 -0800 |
commit | c3c6cea83804e7ba36b31d15ba25954ea3a5bdfd (patch) | |
tree | 41fe090811ef04a83ef89444ea628aa2f1a20c29 /asm/eval.c | |
parent | 80c4f23c52427382e455fd656bcbeeb60d725811 (diff) | |
download | nasm-c3c6cea83804e7ba36b31d15ba25954ea3a5bdfd.tar.gz |
warnings: make WARN_* constant obligatory for warnings
Make it an error to have ERR_WARNING without a suppression level.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'asm/eval.c')
-rw-r--r-- | asm/eval.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -784,7 +784,7 @@ static expr *eval_strfunc(enum strfunc type) } if (rn_warn) - nasm_warn(ERR_PASS1, "character constant too long"); + nasm_warn(WARN_OTHER|ERR_PASS1, "character constant too long"); begintemp(); addtotemp(EXPR_SIMPLE, val); @@ -802,7 +802,7 @@ static int64_t eval_ifunc(int64_t val, enum ifunc func) case IFUNC_ILOG2E: case IFUNC_ILOG2W: if (!is_power2(uval)) - nasm_error((func == IFUNC_ILOG2E) ? ERR_NONFATAL : ERR_WARNING, + nasm_error((func == IFUNC_ILOG2E) ? ERR_NONFATAL : ERR_WARNING|WARN_OTHER, "ilog2 argument is not a power of two"); /* fall through */ case IFUNC_ILOG2F: @@ -942,7 +942,7 @@ static expr *expr6(void) case TOKEN_STR: tmpval = readstrnum(tokval->t_charptr, tokval->t_inttwo, &rn_warn); if (rn_warn) - nasm_warn(ERR_PASS1, "character constant too long"); + nasm_warn(WARN_OTHER|ERR_PASS1, "character constant too long"); addtotemp(EXPR_SIMPLE, tmpval); break; case TOKEN_REG: |