I've heard two good reasons why end of file new-line characters are a good idea. First, if you were to concatenate two files together (such as how i think the prepreocessor handles a #include), without that newline the last line of the first file and the first line of the second file would be appended together as one long line, instead of being one after another. Secondly, the lack of a newline could indicate a corrupt file / broken pipe.
On 11/21/06, Steven Edwards winehacker@gmail.com wrote:
On 11/20/06, Jaap Stolk jwstolk@gmail.com wrote:
it seems to be "official" :-) This is in section 2.1.1.2 of the ANSI C 1989 standard. Section 5.1.1.2 of the ISO C 1999 standard (and probably also the ISO C 1990 standard).
Thanks I found it.
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.
-- Steven Edwards
"There is one thing stronger than all the armies in the world, and that is an idea whose time has come." - Victor Hugo