www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - [Bug report] Tokens that are not separated by whitespace concatenate

Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

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