>>>>> "Robert" == Robert Dewar <[EMAIL PROTECTED]> writes:

 Robert> I am puzzled, why would *ANYONE* who knows C use int rather
 Robert> than unsigned if they want wrap around semantics?

Because most people don't follow the rule that "always use unsigned
variables unless you know that it really needs to be signed".

And also because most people believe that C applies normal computer
arithmetic, and they believe that normal computer arithmetic is
wrapped 2's complement.  (And indeed it usually is, give or take some
bizarre exceptions like MAX_INT % -1)

We all know better, but how tiny is the fraction of C programmers who
have ever even *seen* the ANSI C spec, much less know in detail what
it says?

        paul

Reply via email to