From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5137 invoked by alias); 19 Feb 2003 23:48:50 -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 5117 invoked by uid 48); 19 Feb 2003 23:48:50 -0000 Date: Wed, 19 Feb 2003 23:48:00 -0000 Message-ID: <20030219234850.5116.qmail@sources.redhat.com> To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, rpm31@student.canterbury.ac.nz From: neil@gcc.gnu.org Reply-To: neil@gcc.gnu.org, gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, nobody@gcc.gnu.org, rpm31@student.canterbury.ac.nz, gcc-gnats@gcc.gnu.org Subject: Re: preprocessor/9764: Varargs macro extension incorrectly expands if the varargs argument is the macro itself X-SW-Source: 2003-02/txt/msg00963.txt.bz2 List-Id: Synopsis: Varargs macro extension incorrectly expands if the varargs argument is the macro itself State-Changed-From-To: open->closed State-Changed-By: neil State-Changed-When: Wed Feb 19 23:48:50 2003 State-Changed-Why: 3.1 and later give the following, which is correct. I've not checked 3.0, but I expect it's similar. $ cat /tmp/bar.c #define func(a, varargs...) _func(a, ##b) func(a, func(a, b)); $ gcc -E /tmp/bar.c # 1 "/tmp/bar.c" # 1 "" # 1 "" # 1 "/tmp/bar.c" /tmp/bar.c:3:19: pasting "," and "b" does not give a valid preprocessing token _func(a,b); http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9764