From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12810 invoked by alias); 8 Mar 2005 09:43:07 -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 11841 invoked from network); 8 Mar 2005 09:42:30 -0000 Received: from unknown (HELO emea1-mh.id2.novell.com) (195.33.99.129) by sourceware.org with SMTP; 8 Mar 2005 09:42:30 -0000 Received: from EMEA1-MTA by emea1-mh.id2.novell.com with Novell_GroupWise; Tue, 08 Mar 2005 09:42:29 +0100 Message-Id: Date: Tue, 08 Mar 2005 09:43:00 -0000 From: "Jan Beulich" To: , Cc: , Subject: [PATCH] Re: gas: should duplicate .macro directives be allowed? Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__PartF2D19086.1__=" X-SW-Source: 2005-03/txt/msg00077.txt.bz2 This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__PartF2D19086.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline Content-length: 2682 >>> Daniel Jacobowitz 07.03.05 17:19:17 >>> >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. gas/ 2004-03-08 Jan Beulich * doc/as.texinfo: Add sentence to indicate redefining a macro is an error, and point to .purgem documentation if someone really needs re-definitions. * NEWS: Mention macro redefinition is now an error. --- /home/jbeulich/src/binutils/mainline/2005-03-08/gas/NEWS 2005-02-28 08:27:12.000000000 +0100 +++ 2005-03-08/gas/NEWS 2005-03-08 10:14:27.334292936 +0100 @@ -1,5 +1,7 @@ -*- text -*- +* Redefinition of macros now results in an error. + * New command line option -mhint.b=[ok|warning|error] for IA64 targets. * New command line option -munwind-check=[warning|error] for IA64 --- /home/jbeulich/src/binutils/mainline/2005-03-08/gas/doc/as.texinfo 2005-03-04 15:51:47.000000000 +0100 +++ 2005-03-08/gas/doc/as.texinfo 2005-03-08 10:35:54.158665896 +0100 @@ -4838,8 +4838,10 @@ With that definition, @samp{SUM 0,5} is Begin the definition of a macro called @var{macname}. If your macro definition requires arguments, specify their names after the macro name, separated by commas or spaces. You can supply a default value for any -macro argument by following the name with @samp{=@var{deflt}}. For -example, these are all valid @code{.macro} statements: +macro argument by following the name with @samp{=@var{deflt}}. You +cannot define two macros with the same @var{macname} unless it has been +subject to the @code{.purgem} directive (@xref{Purgem}.) between the two +definitions. For example, these are all valid @code{.macro} statements: @table @code @item .macro comm --=__PartF2D19086.1__= Content-Type: text/plain; name="binutils-mainline-macro-diagnostics-doc.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename="binutils-mainline-macro-diagnostics-doc.patch" Content-length: 1551 gas/ 2004-03-08 Jan Beulich * doc/as.texinfo: Add sentence to indicate redefining a macro is an error, and point to .purgem documentation if someone really needs re-definitions. * NEWS: Mention macro redefinition is now an error. --- /home/jbeulich/src/binutils/mainline/2005-03-08/gas/NEWS 2005-02-28 08:27:12.000000000 +0100 +++ 2005-03-08/gas/NEWS 2005-03-08 10:14:27.334292936 +0100 @@ -1,5 +1,7 @@ -*- text -*- +* Redefinition of macros now results in an error. + * New command line option -mhint.b=[ok|warning|error] for IA64 targets. * New command line option -munwind-check=[warning|error] for IA64 --- /home/jbeulich/src/binutils/mainline/2005-03-08/gas/doc/as.texinfo 2005-03-04 15:51:47.000000000 +0100 +++ 2005-03-08/gas/doc/as.texinfo 2005-03-08 10:35:54.158665896 +0100 @@ -4838,8 +4838,10 @@ With that definition, @samp{SUM 0,5} is Begin the definition of a macro called @var{macname}. If your macro definition requires arguments, specify their names after the macro name, separated by commas or spaces. You can supply a default value for any -macro argument by following the name with @samp{=@var{deflt}}. For -example, these are all valid @code{.macro} statements: +macro argument by following the name with @samp{=@var{deflt}}. You +cannot define two macros with the same @var{macname} unless it has been +subject to the @code{.purgem} directive (@xref{Purgem}.) between the two +definitions. For example, these are all valid @code{.macro} statements: @table @code @item .macro comm --=__PartF2D19086.1__=--