tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: traditional cpp



Hm, just curious, do you see any problem with the cpp included in pcc? Which is already in-tree?

-- Ragge

David Holland wrote:
I'm told that we need a traditional cpp for moving clang forward... so
I wrote one.

   http://www.eecs.harvard.edu/~dholland/netbsd/tradcpp-20101220/

This was written in about twelve hours so it's not exactly perfect,
and some of the secondary features (most importantly -M and -MD)
aren't fully implemented yet. It requires perhaps another evening's
work to be fully viable.

I also apparently don't have the right ideas about comment removal in
traditional cpp, because it currently exhibits the behavior that

   #define STOP */
   #define START /*
   /* hello there STOP fnord START ho hum */

outputs "fnord", which cannot be what anyone intended. How's it
supposed to be done? Right now it's removing comments after macro
expansion, but if it removes comments before macro expansion then /**/
doesn't work for pasting... or else it has to be treated specially and
stripped out again afterwards?




Home | Main Index | Thread Index | Old Index