Help : File does not end with newline

Paul Lim paullimjh@hotmail.com
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 
error.

For your information and necessary action.

Thank you once again for all your advise.

Sincerely
Paul

>From: Zack Weinberg <zack@codesourcery.com>
>To: dewar@gnat.com
>CC: jsturm@one-point.com, paullimjh@hotmail.com, gcc-help@gcc.gnu.org, 
>gcc@gcc.gnu.org
>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, 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


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Paul.zip
Type: application/zip
Size: 7352 bytes
Desc: not available
URL: <https://gcc.gnu.org/pipermail/gcc-help/attachments/20010930/10552904/attachment.zip>


More information about the Gcc-help mailing list