This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: how to deactivate the warning "no newline at end of file"
- From: Brian Dessent <brian at dessent dot net>
- To: DEV Support Jeremy Virga <dev-support-jvirga at etranges-libellules dot fr>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Tue, 09 Oct 2007 04:01:14 -0700
- Subject: Re: how to deactivate the warning "no newline at end of file"
- References: <470A3E90.4080104@etranges-libellules.fr>
- Reply-to: gcc-help at gcc dot gnu dot org
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