how to deactivate the warning "no newline at end of file"

Brian Dessent brian@dessent.net
Tue Oct 9 11:01:00 GMT 2007


DEV Support Jeremy Virga wrote:

> is there a way to intentionally deactivate the warning "no newline at
> end of file" ?

This is a long-standing complaint that usually results in people just
saying "fix your invalid source code" or "use a non-broken editor."  
See PR14331 for some history.  There have been patches suggested over
the years to add a -Wno-eof-newline option to disable the warning but
they never went in.  However, earlier this year the discussion concluded
that it would be simpler just to remove the warning than to add an
option to disable it, and so if you use a recent 4.3 (mainline >=
2007-05-31) then you will no longer see the warning.

Brian



More information about the Gcc-help mailing list