proposed patch for constant signed/unsigned comparison warning

Jim Wilson wilson@cygnus.com
Wed Sep 24 15:42:00 GMT 1997


	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



More information about the Gcc mailing list