int 0x80



gorlist@int0x80:~$ cat news.txt

warning: no newline at end of file
Have you ever pondered why gcc complains when you compile a .c file that doesn't end with a newline?

My research led me to the C standard.

Excerpt from "5.1.1.2 Translation phases":

"2. 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."

0 Comments
Posted on 13 Dec 2007 by gorlist


Comments
name:
email: * (will not be published)
website:
comment:
Linux creator's first name