Skip to contentSkip to conversation

why is "no newline at end of file" a warning?

DISCUSSION Shriramana Sharma 2 participants 2 messages Jun 28, 2007 – Jun 29, 2007

lore
Share & tools
lore
#0 lore raw

Hello.

gcc (and so many other *nix utilities) often give a warning (sometimes even an error) if there is "no newline at end of file". I would like to know why this is such a serious issue that it deserves to be called a warning (or an error).

Shriramana Sharma.

#1 lore raw
Quoted 6 lines · Shriramana Sharma

Hello.

gcc (and so many other *nix utilities) often give a warning (sometimes even an error) if there is "no newline at end of file". I would like to know why this is such a serious issue that it deserves to be called a warning (or an error).

I think it warns because a file with no newline could have possibly been truncated. Or at least thats what I heard somewhere someplace a while ago :)

Quoted 6 lines

Shriramana Sharma.

-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

Signature · 3 lines
Thanks,

Eric