Re: Style question: comparison between signed and unsigned?

Ulrich Drepper (drepper@ipd.info.uni-karlsruhe.de)
22 Sep 1997 17:57:51 +0200


Thomas Koenig <ig25@mvmap66.ciw.uni-karlsruhe.de> writes:

> What do other people feel? Should signed/unsigned conversions be
> avoided in new code? Should these be eliminated in 2.2? Will patches
> towards that goal be accepted if all they do is clean up error
> messages?

We've certainly eliminated several bugs by removing all these warnings
from glibc. The benefit is also that you think twice about the types
of the variables. Many people still unconditionally use `int's for
loop variables. In many cases `unsigned int' is appropriate and it is
also faster in some cases on some platforms. There are good reasons
for -Wall containing this option now.

-- Uli
---------------. drepper@cygnus.com ,-. Rubensstrasse 5
Ulrich Drepper \ ,-------------------' \ 76149 Karlsruhe/Germany
Cygnus Solutions `--' drepper@gnu.ai.mit.edu `------------------------