Brand Bogard said:
And where is that little nugget piece of information documented? I'm not
questioning your answer, I just thought that standard was able to accomodate
more up to date parsers and lexers. Seems like a simple thing to allow.
It's documented in the standard.
Translation phase 2 is documented in C99 5.1.1.2p2:
Each instance of a backslash character (\) immediately followed by
a new-line character is deleted, splicing physical source lines to
form logical source lines. Only the last backslash on any
physical source line shall be eligible for being part of such a
splice. A source file that is not empty shall end in a new-line
character, which shall not be immediately preceded by a backslash
character before any such splicing takes place.
I agree that allowing arbitrary whitespace between a '\' and a
new-line character would be an improvement. As it is, a stray space
after a '\' can make a program illegal while being entirely invisible.