This is the mail archive of the gcc-bugs@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: G++ preprocessor problem with unary ##


Dave Martindale wrote:-

> I use a large C++ library called LEDA.  It compiled and ran OK using
> g++ 2.95, but parts of it will not compile under 2.96.  The problem is
> in the handling of a particular use of the "##" token pasting operator
> in the preprocessor.  Here is a simplified example of the code that
> causes the problem:

This has come up before.

Simply deleting the ## should work.  There is no such thing as unary ##;
just like there is no such thing as unary division :-)  ## pastes two
surrounding tokens to form a single token; if it doesn't form a single
token it is an error in the source code.

Also, I don't recommend you use 2.96 for preprocessing, if you're
referring to early revisions of the RedHat release.

Have none of the people who have fixed LEDA sent their fixes upstream?

Neil.


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