Help : File does not end with newline

Zack Weinberg zack@codesourcery.com
Sun Sep 30 14:43:00 GMT 2001


On Sun, Sep 30, 2001 at 12:58:42PM -0400, dewar@gnat.com wrote:
> <<Not directly.  But Windows does seem to have a plethora of broken editor
> software.  Try to open/save this file in another source code editor, such
> as emacs or even Windows Notepad.
> >>
> 
> Note that it is entirely within normal Windows standards for the last
> character in the file to be 0x1A, you can even argue that this is the
> standard format, so many editors in Windows put this character there,
> but typical Unix software is not setup to properly handle this end
> of file character on Windows, so perhaps that is the problem.

If this turns out to be the problem, I am willing to add code to
cpplib to recognize 0d 0a 1a EOF as a proper end of file.  Before
doing that, though, I would like to see the complete error log
reported by the compiler.  "warning: no newline at end of file" is not
a fatal error; if that was the only problem reported, compilation
would have succeeded.  There must have been at least one more error
message.  (If the problem is a trailing 0x1a, gcc should have printed
"stray '\32' in program").

I would also like to see the complete contents of diary.h, in a format
guaranteed to preserve control characters (for instance, gzipped and
then MIME-attached or uuencoded).

zw



More information about the Gcc mailing list