Help : File does not end with newline

Paul Lim
Sun Sep 30 17:44:00 GMT 2001

Hi to all,

Zack, I have attached my file here for you to check. I have verified that 
the file attached to you does not compile cleanly i.e it has the "File does 
not end with newline" warning.

I have followed the method recommended by Jeff. I opened up my .h file under 
Unix vi and saved it again. It then managed to compile cleanly without any 

For your information and necessary action.

Thank you once again for all your advise.


>From: Zack Weinberg <>
>Subject: Re: Help : File does not end with newline
>Date: Sun, 30 Sep 2001 14:43:43 -0700
>On Sun, Sep 30, 2001 at 12:58:42PM -0400, wrote:
> > <<Not directly.  But Windows does seem to have a plethora of broken 
> > software.  Try to open/save this file in another source code editor, 
> > 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).

Get your FREE download of MSN Explorer at
-------------- next part --------------
A non-text attachment was scrubbed...
Type: application/zip
Size: 7352 bytes
Desc: not available
URL: <>

More information about the Gcc-help mailing list