[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: traditional cpp
> #define FOO foo /*
> #undef FOO
> #define FOO bar */
> would yield
> bar */
> which definitely isn't right either.
Depends on where you stand on preprocessor lines containing a
begin-comment sequence without a matching end-comment sequence.
In this case, you seem to think this thing begins a comment (on the
first line, ended on the third line). But in your example
#define STOP */
#define START /*
/* hello there STOP fnord START ho hum */
this would lead to considering the second line to begin a comment which
includes all of the third line.
> But if you drop comments on directive lines *before* expansion to
> make this problem go away, the /**/ comments used for token pasting
> disappear and nothing works.
There's a difference between comments on directive lines and comments
partially on directive lines.
> I'm now really curious what a genuine legacy cpp really does.
I played a hunch which was telling me I had a CD or two from PUPS
kicking around. I managed to find it; among other things, it has what
appears to be real 4.3BSD on it, including a "new version" of cpp which
"was written by John F. Reiser".
It fireworks rather badly when I try to build it; I'll be trying to
coax it into building. If I succeed I'll thrown these tests at it.
/~\ The ASCII Mouse
\ / Ribbon Campaign
X Against HTML mouse%rodents-montreal.org@localhost
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B
Main Index |
Thread Index |