Re: Style question: comparison between signed and unsigned?

Ulrich Drepper (drepper@ipd.info.uni-karlsruhe.de)
23 Sep 1997 21:10:04 +0200


"Theodore Y. Ts'o" <tytso@MIT.EDU> writes:

> The fact of the matter is, by having the compiler issue these warnings,
> it makes folks much more likely to ignore *all* compiler warnings, since
> so many of them will be false positives.

If somebody behaves like this it is her/his own fault and I certainly
won't trust the program. This whole discussion looks to me as if some
people fear the extra work caused by this. If the program is written
correctly casts are only necessary if to correct some misconceptions
in the language definition but this is really not frequent.

And (I don't know who mentioned this)

int n = read (...);

is of course plainly wrong. `read` returns ssize_t.

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