Re: Style question: comparison between signed and unsigned?

Theodore Y. Ts'o (tytso@MIT.EDU)
Tue, 23 Sep 1997 14:04:59 -0400


From: "Leslie F. Donaldson" <donaldlf@cs.rose-hulman.edu>
Date: Tue, 23 Sep 1997 11:25:31 -0500 (EST)

>>Quite frankly, anybody who claims that the extra cast is a good thing
>>should be shot on the spot - the extra cast is an abomination and has _no_
>>redeeming features except to shut up a warning from a compiler that thinks
>>it knows better than the programmer.

Very true, but the problem isn't the compiler, or the programmer , it is the
person that designed the interface to read.

This statement is typical of the sort of ivory-tower academics who like
to go around pointing fingers at people, but who probably couldn't write
a robust program themselves. (Those who can't do, teach.) The read(),
write(), interfaces aren't going to change, folks. They predated gcc,
and they will likely outlast gcc. Saying that it's the fault of those
who invented the entire Unix system call interface doesn't help things.

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.

- Ted