From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16746 invoked by alias); 29 Mar 2002 10:01:01 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 16675 invoked from network); 29 Mar 2002 10:00:57 -0000 Received: from unknown (HELO monkey.daikokuya.demon.co.uk) (158.152.184.26) by sources.redhat.com with SMTP; 29 Mar 2002 10:00:57 -0000 Received: from neil by monkey.daikokuya.demon.co.uk with local (Exim 3.35 #1 (Debian)) id 16qtBu-0000pu-00; Fri, 29 Mar 2002 10:01:02 +0000 Date: Fri, 29 Mar 2002 02:01:00 -0000 To: Jim Blandy Cc: gdb-patches@sources.redhat.com Subject: Re: RFC: preprocessor macro support (should actually work now) Message-ID: <20020329100102.GA1261@daikokuya.demon.co.uk> References: <20020328070504.24F455EA11@zwingli.cygnus.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020328070504.24F455EA11@zwingli.cygnus.com> User-Agent: Mutt/1.3.27i From: Neil Booth X-SW-Source: 2002-03/txt/msg00601.txt.bz2 Jim Blandy wrote:- > > This is a revised version of the preprocessor macro support patch I > posted before, tested against the current GCC sources. I've fixed a > bunch of bugs, and made it tolerant of the GCC bugs that came up. > > So please try it out; compile with the -gdwarf-2 -g3 flags. Hi Jim, I've done a bit more research into examples of when token marking is needed when expanding macros. There are a few in the CPP testsuite; here is one (I got this by disabling the feature in CPP and seeing what broke): #define M(x) 2 + M(x) #define N(a) M(a) N (N (9)) The correct expansion is 2 + M(2 + M(9)) I expect your code (though I've not tested it!) will get: 2 + M(2 + 2 + M(9)) Would you try this? Thanks, Neil.