scoping of numeric local labels in assembler macros

Greg McGary greg@mcgary.org
Fri Jun 7 17:54:00 GMT 2002


I have the displeasure of working with a large collection of assembler
macros, which are often nested.  They make liberal use of
small-integer local labels which are vulnerable to collisions.  (E.g.,
macro A calls macro B, both use label `1', so A silently branches to a
location in B, rather than the intended destination in A)

It occurs to me that it would be useful if local labels could be
scoped within macros.  Has this been discussed before?  If I implement
it, will the community want the changes?  Since this is a major change
in semantics, it will only be enabled by a command-line option, and
off by default.

Greg



More information about the Binutils mailing list