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 /nasmlib.h | |
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 'nasmlib.h')
-rw-r--r-- | nasmlib.h | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -71,14 +71,15 @@ extern efunc nasm_malloc_error; #define ERR_NOFILE 0x00000010 /* don't give source file name/line */ #define ERR_USAGE 0x00000020 /* print a usage message */ #define ERR_PASS1 0x00000040 /* only print this error on pass one */ -#define ERR_NO_SEVERITY 0x00000080 /* suppress printing severity */ +#define ERR_PASS2 0x00000080 +#define ERR_NO_SEVERITY 0x00000100 /* suppress printing severity */ /* * These codes define specific types of suppressible warning. */ -#define ERR_WARN_MASK 0x0000FF00 /* the mask for this feature */ -#define ERR_WARN_SHR 8 /* how far to shift right */ +#define ERR_WARN_MASK 0xFFFFF000 /* the mask for this feature */ +#define ERR_WARN_SHR 12 /* how far to shift right */ #define WARN(x) ((x) << ERR_WARN_SHR) |