From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19117 invoked by alias); 8 Mar 2005 01:02:55 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 19030 invoked from network); 8 Mar 2005 01:02:46 -0000 Received: from unknown (HELO ns2.nec.com.au) (147.76.180.2) by sourceware.org with SMTP; 8 Mar 2005 01:02:46 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by ns2.nec.com.au (Postfix) with ESMTP id 4A3203776C; Tue, 8 Mar 2005 12:02:45 +1100 (EST) Received: from ns2.nec.com.au ([127.0.0.1]) by localhost (ns2.nec.com.au [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 07346-01-97; Tue, 8 Mar 2005 12:02:45 +1100 (EST) Received: from smtp2.nec.com.au (smtp2.internal.nec.com.au [172.31.8.19]) by ns2.nec.com.au (Postfix) with ESMTP id 383D137755; Tue, 8 Mar 2005 12:02:45 +1100 (EST) Received: from deer.kts.nec.com.au (localhost.localdomain [127.0.0.1]) by smtp2.nec.com.au (8.12.8/8.12.8) with ESMTP id j2812i9h008603; Tue, 8 Mar 2005 12:02:45 +1100 Received: from dvalin.dd.nec.com.au ([172.31.20.70]) by deer.kts.nec.com.au (8.12.5/8.12.5/Debian-1) with ESMTP id j2812gI5030156; Tue, 8 Mar 2005 12:02:42 +1100 Received: from dvalin.dd.nec.com.au (localhost [127.0.0.1]) by dvalin.dd.nec.com.au (8.12.3/8.12.3/Debian-5) with ESMTP id j2811Wqa002321; Tue, 8 Mar 2005 12:01:32 +1100 Received: (from erik@localhost) by dvalin.dd.nec.com.au (8.12.3/8.12.3/Debian-5) id j2811V3x002319; Tue, 8 Mar 2005 12:01:31 +1100 From: Erik Christiansen Date: Tue, 08 Mar 2005 01:02:00 -0000 To: binutils@sources.redhat.com, gdb@sources.redhat.com, JBeulich@novell.com Subject: Re: gas: should duplicate .macro directives be allowed? Message-ID: <20050308010131.GA686@dd.nec.com.au> References: <20050307161917.GA9583@nevyn.them.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050307161917.GA9583@nevyn.them.org> User-Agent: Mutt/1.5.6+20040722i X-SW-Source: 2005-03/txt/msg00076.txt.bz2 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" 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