duplicate warnings about missing EOF newline

Neil Booth neil@daikokuya.demon.co.uk
Thu May 10 12:50:00 GMT 2001


Matt Kraai wrote:-

> With the latest CVS GCC, I see duplicate warnings about a missing
> newline at the end of file.
> 
> $ echo -n '#define foo bar' > foo.c
> $ gcc -E foo.c
> foo.c:1:15: warning no newline at end of file
> foo.c:1:15: warning no newline at end of file
> $ 

Damn, I thought I'd killed that one.  However,

$ echo -n 'define foo bar' | gcc -E -
# 1 "<stdin>"
<stdin>:1:14: warning: no newline at end of file
define foo bar

works.  It's the fact it's a directive that seems to be doing it.
I'll look into a fix.

Thanks,

Neil.



More information about the Gcc-bugs mailing list