This is the mail archive of the gcc-help@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]
Other format: [Raw text]

Re: pasting "." and "something" does not give a valid preprocessing token..


Dear LLeweLLyn Reese!

You wrote:
> The token-pasting operator is only for making tokens - 'foo##bar'
>      becomes the single token 'foobar' and its result must always
>      produce a single valid token (or the results are undefined). Your
>      examples would have pasted a comma onto the begining of a
>      multichar token, and , is only a valid token by itself.

Ran into the same problem with a construct like this:

  this-> ## v

If I change it to

  this->x ## v

it works, but that's obviously not what I want. Same problem when
constructing namespace defines like:

  mynamespace:: ## v

Is there a way to convince the preprocessor, that I know, what I'm doing and
to accept the result as a vaild token (what it is in C++)? This is with gcc
(GCC) 3.3.1 20030626 (Debian prerelease).

Thanks,
Marc
_______________________________________________________________________________

email: marc@greenie.net, marc.eberhard@alumni.tum.de, marc@affs.org.uk
email: m.a.eberhard@aston.ac.uk, web: http://www.aston.ac.uk/~eberhama/


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