[Nasm-bugs] [Bug 3392543] Pain with %arg names in macro expansions

noreply-nasm at gorcunov.org noreply-nasm at gorcunov.org
Mon Dec 31 03:57:11 PST 2018


C. Masloch <pushbx at 38.de> changed:

           What    |Removed                     |Added
                 CC|                            |pushbx at 38.de

--- Comment #5 from C. Masloch <pushbx at 38.de> ---
> One way to make it work might be to save away a list of the arguments in a macro and %undef them all in your endproc macro.
> The other option is of course to prefix the macros with %$.

FTR, in my macro collection I implement lframe (in lmacros2.mac) by prefixing
names as specified by the lvar/lpar macro user with a question mark. To use the
defines, the user needs to specify the name with the prefix. (Also, I keep
track of the list of all defines and their prior definition state and content,
and restore that upon lleave ctx.)

Similarly, (in lmacros1.mac) I prefix def names with an underscore in order to
work around the same problem in numdef/strdef.

The collection is in the public domain (or provided under Fair License). It's
at https://bitbucket.org/ecm/lmacros/src/default/

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