summaryrefslogtreecommitdiff
path: root/travis
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2020-06-14 20:09:11 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2020-06-14 20:09:11 -0700
commitb292748d9f5fc2ac89a75df4b160a1451a767851 (patch)
tree243013d5b5c2efa78eb79166ea8ae94aa74ca5cd /travis
parent4ed23c8f8557db0ed8578a090a0c483cd993c076 (diff)
downloadnasm-b292748d9f5fc2ac89a75df4b160a1451a767851.tar.gz
preproc, srcfile: much saner handling of %line directives
%line directives really need to be preprocessed early, before normal directive processing. In particular, they are *not* affected by such thing as smacro expansion, or deferred into an mmacro expansion. The %line directive is special because it is explicitly indented to be inserted by an external preprocessor, which can happen at any point. For mmacro and rep expansions, store the current file and line for each expansion line. Similarly, let each istk entry contain such information. Don't emit empty lines in preprocessing-only mode when we are already required to issue a %line directive anyway. This cuts down on clutter a fair bit. Quote filenames in %line directives (and accept quoted filenames in %line directives) if and only if it is necessary for disambiguation. This is required if: 1. The filename contains control characters; 2. The filename begins or ends with whitespace or a quotation mark; 3. The filename is empty. Otherwise issue the filename as-is, for backwards compatibility. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'travis')
-rw-r--r--travis/test/weirdpaste.i.t7
1 files changed, 1 insertions, 6 deletions
diff --git a/travis/test/weirdpaste.i.t b/travis/test/weirdpaste.i.t
index ac7ddf08..1725bdf5 100644
--- a/travis/test/weirdpaste.i.t
+++ b/travis/test/weirdpaste.i.t
@@ -1,9 +1,4 @@
-%line 3+1 ./travis/test/weirdpaste.asm
-
-
-
-%line 10+1 ./travis/test/weirdpaste.asm
-
+%line 11+1 ./travis/test/weirdpaste.asm
dw 25
%line 18+1 ./travis/test/weirdpaste.asm