This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: C++ preprocessor bug or not ?


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]