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: wilson at cygnus dot com
- Subject: Re: proposed patch for constant signed/unsigned comparison warning
- From: Paul Eggert <eggert at twinsun dot com>
- Date: Wed, 24 Sep 1997 16:56:17 -0700
- CC: gcc2 at cygnus dot com, egcs at cygnus dot com
- References: <199709242148.OAA07221@cygnus.com>
Date: Wed, 24 Sep 1997 14:48:11 -0700
From: Jim Wilson <wilson@cygnus.com>
I just compiled GNU diffutils 2.7 using -Wall with
testgcc-970912, and carefully analyzed the resulting
diagnostics.... with a 100% false-alarm ratio on a real
example, I think GCC needs to be improved.
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.
No, diffutils 2.7 was published in 1994, and -Wall didn't generate
these warnings until GCC test releases in 1996. I chose diffutils 2.7
as an example partly because I know that it's so old that it couldn't
possibly have been affected by the current problem with `gcc -Wall'
and signed-vs-unsigned comparisons.
I realize that -W controlled those warnings in GCC 2.0 through
2.7.2.3, but I've been the primary diffutils maintainer since 2.0 was
released in 1992, and I don't compile diffutils with -W (I do use
-Wall). I know that I haven't swept the diffutils code inserting
casts to work around the problem, and I would have known if anybody
else did.