From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 517 invoked by alias); 25 Mar 2003 18:16:00 -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 496 invoked by uid 71); 25 Mar 2003 18:16:00 -0000 Date: Tue, 25 Mar 2003 18:26:00 -0000 Message-ID: <20030325181600.495.qmail@sources.redhat.com> To: nobody@gcc.gnu.org Cc: gcc-prs@gcc.gnu.org, From: Falk Hueffner Subject: Re: c++/10212: Preprocessor ## problem Reply-To: Falk Hueffner X-SW-Source: 2003-03/txt/msg01719.txt.bz2 List-Id: The following reply was made to PR c++/10212; it has been noted by GNATS. From: Falk Hueffner To: rwgk@cci.lbl.gov Cc: gcc-gnats@gcc.gnu.org Subject: Re: c++/10212: Preprocessor ## problem Date: 25 Mar 2003 19:09:40 +0100 rwgk@cci.lbl.gov writes: > 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. Well, gcc is right here, it's simply not valid code. Since C++ allows whitespace between "operator" and the operator token, you could just leave it off. -- Falk