bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug gas/32391] \@ incorrectly handled in nested macros


From: nickc at redhat dot com
Subject: [Bug gas/32391] \@ incorrectly handled in nested macros
Date: Wed, 27 Nov 2024 11:52:40 +0000

https://sourceware.org/bugzilla/show_bug.cgi?id=32391

Nick Clifton <nickc at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |nickc at redhat dot com

--- Comment #1 from Nick Clifton <nickc at redhat dot com> ---
Hi Regis,

  I think that this is more of a lack-of-documentation issue than a bug. 
Specifically - I would expect \@ to evaluate to the same number anywhere inside
a macro, including any nested macros.  So for example:

  .macro outer
     before_inner_\@:
     .macro inner
       .word before_inner_\@
     .endm
     inner
     inner
  .endm
  outer

I would expect that the reference to "before_inner_\@" inside the inner macro
should always result in references to the symbol defined in the outer macro.

So, what do you think to adding this text to the description of the \@ macro:

  Note: \@ is only updated once an entire macro has finished being
  evaluated.  If the macro contains nested macros then the value 
  will only be updated once the outermost macro has finished being 
  evaluated.

Cheers
  Nick

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]