This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: proposed patch for constant signed/unsigned comparison warning
- To: Paul Eggert <eggert at twinsun dot com>
- Subject: Re: proposed patch for constant signed/unsigned comparison warning
- From: Jim Wilson <wilson at cygnus dot com>
- Date: Wed, 24 Sep 1997 14:48:11 -0700
- cc: gcc2 at cygnus dot com, egcs at cygnus dot com
I just compiled GNU diffutils 2.7
using -Wall with testgcc-970912, and carefully analyzed the resulting
diagnostics.
I realize that the signed-vs-unsigned warning is useful in some
applications, but with a 100% false-alarm ratio on a real example,
I think GCC needs to be improved.
I think the analysis is a little flawed here. This code has been compiled by
gcc many times before. It may be the case that all of the warnings are
false alarms because someone else has already fixed all of the cases where
the warning was justified. A better test would be to find some large body
of code that has never been compiled by gcc or any other compiler with
similar warnings and then see what the ratio is.
Jim