Preprocessor Problems

Neil Booth neil@daikokuya.demon.co.uk
Tue Jan 23 11:00:00 GMT 2001


Alexy Khrabrov wrote:-

> Of course I tried that and the file still fails to
> go through g++-2.96 which I got as an RPM
> g++-2.96-69.

Try current GCC.  Like I said, you have an unstable GCC that is buggy.

> LEDA is one of the largest legacy
> C++ libraries, and its config says it recognizes
> g++ 2.95.  So I wonder if I downgrade to 2.95 I
> probably will see the light?  Expanding cascading
> macros with parameters seemingly needs ('s on the
> RHS -- how is it done properly, if at all?

Like I said, just remove it where you are not pasting tokens, since it
is not needed.  Current GCC will continue to warn if you use it
incorrectly, but with a slightly better error message.

> LEDA says it now supports recent KAI and Borland C++.
> Is it possible they are all wrong?  Is there a way
> to revert to wrong behavior then?  ;-)

No, they just don't emit diagnostics.  GCC is deliberately more noisy
than most compilers, and we like it that way 8-) Behaviour is
undefined if you put the ## in where it makes no sense - see the
standards documents - and other preprocessors, such LCC's and UCPP
reject it entirely.

Neil.


More information about the Gcc-bugs mailing list