diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-10-05 19:42:55 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-10-06 18:47:29 -0700 |
commit | e9d7f1a074d625018f7b42060ba3c341ea723967 (patch) | |
tree | cb27dcee1733417c2563f368d4eee569662b3a9f /nasm.c | |
parent | 733cbb3197022811cff2da03f6ebba0a94c3423d (diff) | |
download | nasm-e9d7f1a074d625018f7b42060ba3c341ea723967.tar.gz nasm-e9d7f1a074d625018f7b42060ba3c341ea723967.tar.bz2 nasm-e9d7f1a074d625018f7b42060ba3c341ea723967.zip |
Better warnings for out-of-range values
Issue better warnings for out-of-range values. This is not yet
complete.
In particular, note we may have out-of-range for values that end up
being subject to optimization. That is because the optimization takes
place on the *truncated* value, not the pre-truncated value.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'nasm.c')
-rw-r--r-- | nasm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -1888,7 +1888,8 @@ static bool is_suppressed_warning(int severity) (((severity & ERR_WARN_MASK) != 0 && !warning_on[(severity & ERR_WARN_MASK) >> ERR_WARN_SHR]) || /* See if it's a pass-one only warning and we're not in pass one. */ - ((severity & ERR_PASS1) && pass0 != 1)); + ((severity & ERR_PASS1) && pass0 != 1) || + ((severity & ERR_PASS2) && pass0 != 2)); } /** |