From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10225 invoked by alias); 20 Feb 2003 06:56:02 -0000 Mailing-List: contact gcc-prs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-prs-owner@gcc.gnu.org Received: (qmail 10177 invoked by uid 71); 20 Feb 2003 06:56:01 -0000 Date: Thu, 20 Feb 2003 06:56:00 -0000 Message-ID: <20030220065601.10175.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Neil Booth Subject: Re: preprocessor/9764: Varargs macro extension incorrectly expands if the varargs argument is the macro itself Reply-To: Neil Booth X-SW-Source: 2003-02/txt/msg00970.txt.bz2 List-Id: The following reply was made to PR preprocessor/9764; it has been noted by GNATS. From: Neil Booth To: Ryan Mallon Cc: gcc-gnats@gcc.gnu.org, gcc-bugs@gcc.gnu.org Subject: Re: preprocessor/9764: Varargs macro extension incorrectly expands if the varargs argument is the macro itself Date: Thu, 20 Feb 2003 06:49:17 +0000 Ryan Mallon wrote:- > #define func(a, varargs...) _func(a, ##varargs) > > The problems occurs when the macro name itself is used in the varargs > part: e.g > > func(a, func(b, c)); > > Incorrectly expands to: > > _func(a, func(b, c)); > > Without the token paste opperator in the defintion it works as expected, > but then I cannot have varargs=0. Im working with a large amount of > existing code, so I cannot alter the actual calls on the macro definition. What makes you think it's incorrect? Neil.