Re: Style question: comparison between signed and unsigned?

Mark Cooke (mpc@star.sr.bham.ac.uk)
Mon, 22 Sep 1997 18:29:54 +0100 (BST)


On Mon, 22 Sep 1997, Thomas Koenig wrote:

> 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?

Signed/unsigned comparisions should (nearly) _always_ be avoided. It's a
symptom of inconsistancy/sloppy typedefs in the code. If it doesn't bite
you today, it might bite you tomorrow on a different architecture.

0.02c's worth

Mark

---------------------------------------------------------------------------
Mark Cooke The views expressed above are mine and are not
Systems Programmer necessarily representative of university policy
University Of Birmingham URL: http://www.sr.bham.ac.uk/~mpc/
---------------------------------------------------------------------------