This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Help : File does not end with newline
- To: dewar at gnat dot com
- Subject: Re: Help : File does not end with newline
- From: Zack Weinberg <zack at codesourcery dot com>
- Date: Sun, 30 Sep 2001 14:43:43 -0700
- Cc: jsturm at one-point dot com, paullimjh at hotmail dot com, gcc-help at gcc dot gnu dot org,gcc at gcc dot gnu dot org
- References: <20010930165842.2ACA6F2B7A@nile.gnat.com>
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