diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-13 21:53:31 -0800 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2018-12-13 21:53:31 -0800 |
commit | 723ab481a6550454a6f834bb854e751744ca340a (patch) | |
tree | cb217692a76d3dcab83c7ad922e3adca9006dccd /nasmlib | |
parent | 6bde2ed8806b3e53657d46b61ee79d7afe5c2e13 (diff) | |
download | nasm-723ab481a6550454a6f834bb854e751744ca340a.tar.gz |
warnings: define warning classes at point of usemkwarnings
It is extremely desirable to allow the user fine-grained control of
warnings, but this has been complicated by the fact that a warning
class has had to be defined in no less than three places (error.h,
error.c, nasmdoc.src) before it can be used in source code. Instead,
use a script to define these via magic comments at the point of use.
This hopefully will encourage creating new classes as needed.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'nasmlib')
-rw-r--r-- | nasmlib/readnum.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/nasmlib/readnum.c b/nasmlib/readnum.c index 02e30830..4e73c1a1 100644 --- a/nasmlib/readnum.c +++ b/nasmlib/readnum.c @@ -163,10 +163,16 @@ int64_t readnum(const char *str, bool *error) r++; } - if (warn) + if (warn) { + /*! + *!number-overflow [on] numeric constant does not fit + *! covers warnings about numeric constants which + *! don't fit in 64 bits. + */ nasm_error(ERR_WARNING | ERR_PASS1 | WARN_NUMBER_OVERFLOW, "numeric constant %s does not fit in 64 bits", str); + } return result * sign; } |