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 (moz@compsoc.man.ac.uk) [20010206 12:47]:

> The following code (cut from qt 1.45) :
> 
> #if defined(xor)
> // blah
> #endif
> 
> is not appreciated by g++ > 2.95.2
> 
> "/tmp/@21568.7.cc:1:13: "defined" without an identifier"
> 
> 1) shouldn't this be parse error, if xor is a keyword by default now ?
> 
> 2) is this definitely Qt's fault (if so, I will have to work around it
>    in a very ugly way)

This is Qt's fault, which Trolltech fixed in Qt 2.0. For 1.X, the easiest
way is to pass -fno-operator-names to g++.

Philipp

-- 
Philipp Thomas <pthomas@suse.de>
Development, SuSE GmbH, Schanzaecker Str. 10, D-90443 Nuremberg, Germany

Penguins shall save the dinosaurs
                          -- Handelsblatt about Linux on S/390

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