[Nasm-bugs] [Bug 3392567] [Feature request] Listing preprocessor define results in list file

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Sat Aug 10 01:05:23 PDT 2019


https://bugzilla.nasm.us/show_bug.cgi?id=3392567

--- Comment #5 from C. Masloch <pushbx at 38.de> ---
Thanks, -Lm mostly shows the same as my patch. Changes include listing
"%idefine" or "%define" (instead of "expansion ... (case-insensitive)"), not
listing a context's name, and also listing "%undef". In %undef lines, you
actually include the value it was defined as. (Btw, shouldn't there be an
%iundef directive?)

However, I noticed that if %undef is specified with an already not-defined
macro name, no -Lm output is produced.

And when %define is used with a token (rather than %xdefine or %assign), the
listing shows the un-expanded define value, eg ";;; %define %$type
__lframe__autoret" for
https://bitbucket.org/ecm/lmacros/src/44c3a480632df5887e825d6372d8ecc28f9bd0be/lmacros2.mac#lines-901
 However, "%define %$type %1"
https://bitbucket.org/ecm/lmacros/src/44c3a480632df5887e825d6372d8ecc28f9bd0be/lmacros2.mac#lines-891
does expand the %1 first and thus shows ";;; %define %$type auto". I guess this
is as intended.

Also, I still think a pragma or other switch that can be activated from within
the source file would be useful. If I want to include -Lm when supported, I
have to check the NASM version from my build script. If -Lm could be switched
on conditionally within the source, then the test could be moved into the
source.

Another thing I noticed is that -Le doesn't show any output for macros defined
with .nolist which seems a bit counter-intuitive. It would be good if this
(optionally?) also showed the resulting lines fed to the assembler. I don't
want to change all macros to drop .nolist just to view the preprocessor output
lines with -Le.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.


More information about the Nasm-bugs mailing list