aboutsummaryrefslogtreecommitdiffstats
path: root/asm
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2020-07-10 02:55:50 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2020-07-10 02:55:50 -0700
commita79a700208d771fb3b8e6e7f03fcc195c2d1831c (patch)
treee7b4dc9e0d2e855e26304f5d32c2809d7946ef05 /asm
parent015ddc1b33d3b40d16e018f80528bbd15979b873 (diff)
downloadnasm-a79a700208d771fb3b8e6e7f03fcc195c2d1831c.tar.gz
nasm-a79a700208d771fb3b8e6e7f03fcc195c2d1831c.tar.xz
nasm-a79a700208d771fb3b8e6e7f03fcc195c2d1831c.zip
preproc: add a %null directive for the masm macro package
Instead of %pragma ignore, use a new %null directive which ignores the rest of the line, without bothering to expand it. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'asm')
-rw-r--r--asm/pptok.dat1
-rw-r--r--asm/preproc.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/asm/pptok.dat b/asm/pptok.dat
index b6285c36..0fdbbad6 100644
--- a/asm/pptok.dat
+++ b/asm/pptok.dat
@@ -89,6 +89,7 @@
%include
%line
%local
+%null
%pop
%pragma
%push
diff --git a/asm/preproc.c b/asm/preproc.c
index 4fcdb359..ccb00f3b 100644
--- a/asm/preproc.c
+++ b/asm/preproc.c
@@ -4649,6 +4649,11 @@ issue_error:
case PP_LINE:
nasm_panic("`%s' directive not preprocessed early", dname);
break;
+
+ case PP_NULL:
+ /* Goes nowhere, does nothing... */
+ break;
+
}
done: