R
Richard Heathfield
Kenneth Brody said:
Yes. Line-splicing happens in Translation Phase 2, whereas comment removal
doesn't happen until Translation Phase 3.
The reason I mentioned Win32 is only that its gerharsterly habit of using
the \ character as a path separator makes it more likely for such comments
to appear in Win32 programs. Other platforms are not immune by any means.
Richard Heathfield wrote:
[...][...]I have three principal objections to them. Firstly, it is all too easy,
on Win32 platforms, to do this:
foo(); // widgetify the grommets, default directory is c:\temp\
bar(); // why oh WHY isn't this being called?
Eww... I hadn't realized that would continue the comment onto the
second line. (Not that I'd ever use such a construct, mind you.)
But, you are correct, and the call to bar() disappears inside the
comment. (At least with MSVC6. Is this guaranteed by the Standard?)
Yes. Line-splicing happens in Translation Phase 2, whereas comment removal
doesn't happen until Translation Phase 3.
The reason I mentioned Win32 is only that its gerharsterly habit of using
the \ character as a path separator makes it more likely for such comments
to appear in Win32 programs. Other platforms are not immune by any means.