On May 7, 7:47 pm, friendfish <friendf...@gma il.comwrote:
Anyone can told me about the warrning which GCC generated as following:
"No newline at end of file"?
By convention, in a Unix "text" file, all lines are terminated by the
newline character.
Most Unix text editors respect this convention.
gcc is warning you that the file is not conforming to the convention,
which means the last line might have been truncated and therefore you
should look into that as it is a potential problem.
On May 7, 7:47�pm, friendfish <friendf...@gma il.comwrote:
Anyone can told me about the warrning which GCC generated as
following: "No newline at end of file"?
>
By convention, in a Unix "text" file, all lines are terminated by the
newline character.
Most Unix text editors respect this convention.
gcc is warning you that the file is not conforming to the convention,
which means the last line might have been truncated and therefore
you should look into that as it is a potential problem.
On Thu, 08 May 2008 10:47:57 +0800, friendfish <friendfish@gma il.com>
wrote in comp.lang.c:
Anyone can told me about the warrning which GCC generated as following:
"No newline at end of file"?
The C standard states that "a source file that is non-empty shall end
in a new-line character" and your source file doesn't. So add one.
Open the source file in a text editor. Move the cursor to the end of
the last line, after the last character. Press the "Enter" key on
your keyboard. Save the file.
Comment