This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Warning policy?
- To: egcs at cygnus dot com
- Subject: Re: Warning policy?
- From: Kamil Iskra <kamil at dwd dot interkom dot pl>
- Date: Sat, 2 Jan 1999 15:16:38 +0100 (EET)
On Fri, 1 Jan 1999, Kaveh R. Ghazi wrote:
> My impression was that gcc's response to dead code was to
> eliminate it, not warn about it. At least that's what the comments/docs
> suggest...
As far as I remember, this comment comes from gcc2 era.
IMHO, the EGCS project should reconsider this issue. In my experience,
unreachable code is always a result of an oversight on my side.
Therefore, I would much appreciate if GCC warned when if finds dead code.
I find it hard to imagine a human written code that intentionally
contained dead code, unless the code was in a state of flux.
Of course, it's a different story when it comes to machine-generated code
and I agree that GCC should not warn about dead code by default. Still,
I can see nothing wrong in providing this functionality under -Wdead-code.
/ Kamil Iskra AmigaOS Linux/i386 Linux/m68k \
| GeekGadgets m68k-amigaos GCC maintainer |
| iskra@student.uci.agh.edu.pl kiskra@ernie.icslab.agh.edu.pl |
\ kamil@dwd.interkom.pl http://student.uci.agh.edu.pl/~iskra /