From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15100 invoked by alias); 22 Apr 2005 15:46:07 -0000 Mailing-List: contact binutils-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: binutils-owner@sources.redhat.com Received: (qmail 14773 invoked from network); 22 Apr 2005 15:45:38 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sourceware.org with SMTP; 22 Apr 2005 15:45:38 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.11/8.12.11) with ESMTP id j3MFjcSQ019075 for ; Fri, 22 Apr 2005 11:45:38 -0400 Received: from pobox.surrey.redhat.com (pobox.surrey.redhat.com [172.16.10.17]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id j3MFjbO28320; Fri, 22 Apr 2005 11:45:37 -0400 Received: from [172.31.0.98] (vpnuser7.surrey.redhat.com [172.16.9.7]) by pobox.surrey.redhat.com (8.12.8/8.12.8) with ESMTP id j3MFjakk001061; Fri, 22 Apr 2005 16:45:36 +0100 Message-ID: <42691BDE.8070808@redhat.com> Date: Fri, 22 Apr 2005 15:46:00 -0000 From: Nick Clifton User-Agent: Mozilla Thunderbird 1.0 (X11/20041206) MIME-Version: 1.0 To: Jan Beulich CC: binutils@sources.redhat.com Subject: Re: [PATCH] more macro diagnostics adjustments References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-04/txt/msg00633.txt.bz2 Hi Jan, > gas/ > 2005-04-18 Jan Beulich > > * macro.c (macro_expand_body): Replace locals indicator parameters > with actual macro_entry. New local variables macro_line and err. > Don't return when encountering an error, just record the fact. > Detect local symbol name colliding with parameter. Track line number > inside of macro expansion. > (do_formals): Move local variable name to wider scope. Check > parameter of the same name doesn't already exist. In MRI mode, also > check it doesn't collide with the argument count pseudo-parameter). > (define_macro): Add file and line number parameters. Remove local > variable namestr. New local variable error. Initialize macro_entry > members file, line, and name. Don't return when encountering an > error, just record the fact. Use %s in some diagnostics for read.c > to insert the macro name. Free macro_entry on error. > (macro_expand): Pass macro_entry to macro_epand_body. Don't return > when encountering an error, just record the fact. > (expand_irp): Don't return when encountering an error, just record > the fact. > * macro.h (macro_struct): New members name, file, and line. > (define_macro): Add file and line number parameters. > * read.c (s_macro): Pass file and line to define_macro. Tag warning > regarding pseudo-op redefinition with the file/line that macro > definition started at. > > gas/testsuite/ > 2005-04-18 Jan Beulich > > * gas/macros/badarg.s: Add tests for collisions between/among macro > parameters and local symbols. > * gas/macros/badarg.l: Adjust. Approved - please apply. Cheers Nick