c++ - [Bug report] Tokens that are not separated by whitespace concatenate
- Daniel James (13/13) Aug 12 2004 This bug is not very important, it doesn't cause any problems with the
This bug is not very important, it doesn't cause any problems with the
boost preprocessor library. It's just something I stumbled across that
could potentially cause problems.
#define FOO(x) x
FOO(1)1
This expands to '11' when it should expand to '1 1'.
I believe that internally the two 1's should be stored as separate but
adjacent tokens, then, if converted to text, the whitespace should be
inserted to show that they are separate. But I'm not an expert on this,
and I don't have a copy of the standard to check, so there's a good
chance that I could be wrong.
As before, I've attached some relevant tests from wave.
Daniel
Aug 12 2004








Daniel James <daniel calamity.org.uk>