This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: C++ preprocessor bug or not ?
- To: John Levon <moz at compsoc dot man dot ac dot uk>
- Subject: Re: C++ preprocessor bug or not ?
- From: Nathan Sidwell <nathan at codesourcery dot com>
- Date: Tue, 06 Feb 2001 12:05:22 +0000
- CC: gcc at gcc dot gnu dot org
- Organization: Codesourcery LLC
- References: <Pine.LNX.4.21.0102061144440.15285-100000@mrworry.compsoc.man.ac.uk>
John Levon wrote:
>
> The following code (cut from qt 1.45) :
>
> #if defined(xor)
> // blah
> #endif
>
> is not appreciated by g++ > 2.95.2
this should work, see attached where I've tried `if' too. `if' works, `xor' does
not.
Please file bug report
nathan@uha:6>./g++ -B ./ -E current/zap.C
# 4 "current/zap.C"
current/zap.C:7:14: "defined" without an identifier
not if
not xor
ouch!
nathan
--
Dr Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery LLC
'But that's a lie.' - 'Yes it is. What's your point?'
nathan@codesourcery.com : http://www.cs.bris.ac.uk/~nathan/ : nathan@acm.org
#if defined (if)
is if
#else
not if
#endif
#if defined (xor)
is xor
#else
not xor
#endif