g++ 2.96 problem

Loren James Rittle rittle@latour.rsch.comm.mot.com
Mon Jun 12 15:58:00 GMT 2000


> If I change variable compl to anything else, it works.  So the
> question is, is compl a reserved word for C++?

See page 829 of _The C++ Programming Language_, Special Edition.

compl is unconditionally a C++ keyword with the same meaning as ~.

For whatever it is worth, C99 requires that a header be included to
get the operator names (which of course are usually just macros not
keywords as in C++).

> It wasn't the case in g++ 2.95.x

g++ is now more compliant with the ISO standard.  This is a good thing.

As a short-term way to get old code to compile, try adding:

-fno-operator-names

However, any code that uses operator names (in any manner other than
as a keyword) should be converted ASAP.

Regards,
Loren


More information about the Gcc-bugs mailing list