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 /asm/pragma.c | |
parent | 6bde2ed8806b3e53657d46b61ee79d7afe5c2e13 (diff) | |
download | nasm-mkwarnings.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 'asm/pragma.c')
-rw-r--r-- | asm/pragma.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/asm/pragma.c b/asm/pragma.c index 85e8c9cd..b6878e9d 100644 --- a/asm/pragma.c +++ b/asm/pragma.c @@ -146,10 +146,20 @@ found_it: case DIRR_UNKNOWN: switch (pragma->opcode) { case D_none: + /*! + *!bad-pragma [off] empty or malformed %pragma + *! warns about a malformed or otherwise unparsable + *! \c{%pragma} directive. + */ nasm_error(ERR_WARNING|ERR_PASS2|WARN_BAD_PRAGMA, "empty %%pragma %s", pragma->facility_name); break; default: + /*! + *!unknown-pragma [off] unknown %pragma facility or directive + *! warns about an unknown \c{%pragma} directive. + *! This is not yet implemented for most cases. + */ nasm_error(ERR_WARNING|ERR_PASS2|WARN_UNKNOWN_PRAGMA, "unknown %%pragma %s %s", pragma->facility_name, pragma->opname); @@ -176,6 +186,13 @@ found_it: return true; } +/* This warning message is intended for future use */ +/*! + *!not-my-pragma [off] %pragma not applicable to this compilation + *! warns about a \c{%pragma} directive which is not applicable to + *! this particular assembly session. This is not yet implemented. + */ + void process_pragma(char *str) { struct pragma pragma; |