This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: [patch] gas -- @ Character in macro expansion
- To: clm at cygnus dot com
- Subject: Re: [patch] gas -- @ Character in macro expansion
- From: Ian Lance Taylor <ian at zembu dot com>
- Date: 28 Apr 2000 14:21:48 -0700
- CC: binutils at sourceware dot cygnus dot com
- References: <200004282016.NAA17184@cygint.cygnus.com>
Date: Fri, 28 Apr 2000 13:16:19 -0700
From: Catherine Moore <clm@cygnus.com>
This patch addresses a problem that I am seeing with the
expansion of the @ character in macros. The doc says that
the @ character will expand to the number of times the macro
was invoked. We are currently prepending leading zeroes to this
number. So for this test case:
...
The parser thinks that we are processing octal numbers (due to the
leading zeroes) and rejects values 00008 and 00009. I would
like to change the macro expander so that it no longer prepends the
zeroes. What do others think?
I think the expected use of @ was L\@, to produce a unique label. It
seems odd to parse \@ as a number.
However, I guess as documented, there is no need for the leading
zeroes, and I can't think of anything that would break if they were
removed, so I guess this is OK.
Ian