From: Erik Christiansen <erik@dd.nec.com.au>
To: binutils@sources.redhat.com, gdb@sources.redhat.com, JBeulich@novell.com
Subject: Re: gas: should duplicate .macro directives be allowed?
Date: Tue, 08 Mar 2005 01:02:00 -0000 [thread overview]
Message-ID: <20050308010131.GA686@dd.nec.com.au> (raw)
In-Reply-To: <20050307161917.GA9583@nevyn.them.org>
On Mon, Mar 07, 2005 at 11:19:17AM -0500, Daniel Jacobowitz wrote:
> On Mon, Mar 07, 2005 at 11:15:02AM -0500, Ian Lance Taylor wrote:
> > "Jan Beulich" <JBeulich@novell.com> writes:
> >
> > > Yes, the change was deliberate, and I don't think it'd be wise to revert
> > > it (it's simply dangerous considering that you might have these
> > > collisions resulting from two include files, each of which relies on
> > > their definition of the respective macro). Instead, if you need to
> > > override a previous macro definition (and know what you're doing), you
> > > can use easily use .purgem before the new definition (really, I'd rather
> > > recommend not to to catch the collision). Jan
> >
> > That seems more or less reasonable to me, but Daniel is correct that
> > this change must be mentioned in NEWS. It should be documented
> > somewhere in as.texinfo as well, if it is not already.
>
> While I'm wishing, it would be nice if the documentation mentioned
> .purgem somewhere from .macro. I spent a while trying to figure out if
> there was a right way to do this from the manual, and did not come
> across .purgem until Jan mentioned it.
Is there merit to issuing a warning on probably inadvertent macro
redefinition? (i.e. Not purged first.) Silent brute-force redefinition
seems very risky, since it depends on fortuitous header include order,
if the preferred macro is to win the invisible contest. Existing code
inadvertently relying on the silent contest would not be broken by a
warning, but the risky programming would be revealed.
My many macros have not yet collided, but if multiple include files
should ever lead to name conflict, the assembler should warn, because
one macro is in desperate need of renaming or purging, purely through
oversight resulting from increasing complexity.
Many thanks for your tireless efforts.
Erik
next prev parent reply other threads:[~2005-03-08 1:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-07 7:36 Jan Beulich
2005-03-07 16:15 ` Ian Lance Taylor
2005-03-07 16:20 ` Daniel Jacobowitz
2005-03-08 1:02 ` Erik Christiansen [this message]
-- strict thread matches above, loose matches on Subject: below --
2005-03-06 17:56 Daniel Jacobowitz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050308010131.GA686@dd.nec.com.au \
--to=erik@dd.nec.com.au \
--cc=JBeulich@novell.com \
--cc=binutils@sources.redhat.com \
--cc=gdb@sources.redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox