aboutsummaryrefslogtreecommitdiffstats
path: root/doc
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 /doc
parent4ed23c8f8557db0ed8578a090a0c483cd993c076 (diff)
downloadnasm-b292748d9f5fc2ac89a75df4b160a1451a767851.tar.gz
nasm-b292748d9f5fc2ac89a75df4b160a1451a767851.tar.xz
nasm-b292748d9f5fc2ac89a75df4b160a1451a767851.zip
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 'doc')
0 files changed, 0 insertions, 0 deletions