path: root/asm/stdscan.c
diff options
authorH. Peter Anvin (Intel) <hpa@zytor.com>2018-12-13 21:53:31 -0800
committerH. Peter Anvin (Intel) <hpa@zytor.com>2018-12-13 21:53:31 -0800
commit723ab481a6550454a6f834bb854e751744ca340a (patch)
treecb217692a76d3dcab83c7ad922e3adca9006dccd /asm/stdscan.c
parent6bde2ed8806b3e53657d46b61ee79d7afe5c2e13 (diff)
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/stdscan.c')
1 files changed, 6 insertions, 0 deletions
diff --git a/asm/stdscan.c b/asm/stdscan.c
index b197b27f..ee6d0442 100644
--- a/asm/stdscan.c
+++ b/asm/stdscan.c
@@ -167,6 +167,12 @@ int stdscan(void *private_data, struct tokenval *tv)
token_type = nasm_token_hash(ourcopy, tv);
if (unlikely(tv->t_flag & TFLAG_WARN)) {
+ /*!
+ *!ptr [on] non-NASM keyword used in other assemblers
+ *! warns about keywords used in other assemblers that might
+ *! indicate a mistake in the source code. Currently only the MASM
+ *! \c{PTR} keyword is recognized.
+ */
nasm_warnf(ERR_PASS1|WARN_PTR, "`%s' is not a NASM keyword",