From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27173 invoked by alias); 25 Mar 2003 18:06:01 -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 27148 invoked by uid 71); 25 Mar 2003 18:06:00 -0000 Resent-Date: 25 Mar 2003 18:06:00 -0000 Resent-Message-ID: <20030325180600.27147.qmail@sources.redhat.com> Resent-From: gcc-gnats@gcc.gnu.org (GNATS Filer) Resent-Cc: gcc-prs@gcc.gnu.org, gcc-bugs@gcc.gnu.org Resent-Reply-To: gcc-gnats@gcc.gnu.org, rwgk@cci.lbl.gov Received: (qmail 25100 invoked by uid 48); 25 Mar 2003 18:00:43 -0000 Message-Id: <20030325180043.25099.qmail@sources.redhat.com> Date: Tue, 25 Mar 2003 18:16:00 -0000 From: rwgk@cci.lbl.gov Reply-To: rwgk@cci.lbl.gov To: gcc-gnats@gcc.gnu.org X-Send-Pr-Version: gnatsweb-2.9.3 (1.1.1.1.2.31) Subject: c++/10212: Preprocessor ## problem X-SW-Source: 2003-03/txt/msg01718.txt.bz2 List-Id: >Number: 10212 >Category: c++ >Synopsis: Preprocessor ## problem >Confidential: no >Severity: serious >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Tue Mar 25 18:06:00 UTC 2003 >Closed-Date: >Last-Modified: >Originator: Ralf W. Grosse-Kunstleve >Release: cvs gcc-3_3-branch 2003-03-25 approx. 08:00AM PST >Organization: >Environment: Redhat 7.3 on Pentium >Description: The code below fails to compile with current cvs gcc 3.3: % cat z.cpp # define BOOST_PYTHON_INPLACE_OPERATOR(op) \ template \ inline R \ operator##op(R const& a, R const& b ) \ { \ return a+b; \ } BOOST_PYTHON_INPLACE_OPERATOR(+) % gcc --version gcc (GCC) 3.3 20030325 (prerelease) % gcc -c z.cpp z.cpp:9:32: pasting "operator" and "+" does not give a valid preprocessing token % echo $status 1 The original code compiles with a large number of compilers incl. several EDG-based, Visual C++ and gcc 2.96 - gcc 3.2.2. Older gcc's issue a warning which can be suppressed with -w. >How-To-Repeat: See description. >Fix: >Release-Note: >Audit-Trail: >Unformatted: