LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   "No new line at end of file" (https://www.linuxquestions.org/questions/programming-9/no-new-line-at-end-of-file-122970/)

Misel 12-05-2003 11:11 AM

"No new line at end of file"
 
I see that quite often and yes, I understand the message. But I created this thread to ask where it came from. Why does gcc prints out that warning.

To me it doesn't really serve a purpose - especially since I haven't seen any errors due to a missing new line so far.

Any ideas? :)

jim mcnamara 12-05-2003 11:21 AM

Unix utilities often read in the entrie file, then process it, eg., sort, gcc.

The old presumption was that the file was truncated or corrupted- this used to happen a lot when disks went bad on a monthly basis 25 years ago. The EOF marker for a text file is ASCII 26. So if one bit of a real byte got twiddled, an EOF could appear where it was not supposed to be.

That's the origin of the warning.

Misel 12-05-2003 12:55 PM

thank you :)


All times are GMT -5. The time now is 11:28 AM.