This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: [PATCH] Re: .macro behavior
- From: Ian Lance Taylor <ian at airs dot com>
- To: "Jan Beulich" <JBeulich at novell dot com>
- Cc: <binutils at sources dot redhat dot com>
- Date: 02 Mar 2005 09:41:51 -0500
- Subject: Re: [PATCH] Re: .macro behavior
- References: <s2257923.004@emea1-mh.id2.novell.com>
"Jan Beulich" <JBeulich@novell.com> writes:
> >And I still think there's greater benefit from keeping the
> >syntax of macro *parameter names* the same as today, something
> >like "[A-Za-z_][A-Za-z0-9_]+" and not dependent on the target
> >symbol character set. (Heh, saying :alpha: and :alnum: would
> >imply it's locale-dependent. I don't think we want *that*! ;-)
>
> One additional note here: The current behavior is to allow
> "[A-Za-z_$][A-Za-z0-9_$]+", which already is in conflict with some
> targets' use of '$' (see those defining LEX_DOLLAR).
> I would consider it acceptable to shrink the set down to
> "[A-Za-z_][A-Za-z0-9_]+" as you suggest (in order to be largest commonly
> acceptable set in general. However, since macros can be used to define
> macros, having a way to avoid 'common' symbol names may be quite
> valuable, and having available as option here only underscores (to add a
> prefix and/or suffix) may make things rather difficult. I'd therefore
> like to not restrict targets that allow a reasonable set of additional
> symbol characters from actually using them here.
>
> Still, I'm hoping to get comments on this from others, namely Ian, who
> originally agreed that the current behavior doesn't seem to be
> intended.
I'm reading this, but I don't have any particular comment. The
current behaviour was an accident of implementation. I think Steve
and Judy wrote gasp over a weekend once, and I didn't change the
behaviour when I reworked it into gas. But I don't really have an
opinion on what the right behaviour should be.
Ian