This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: signed is undefined and has been since 1992 (in GCC)


Paul Koning wrote:

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)

and not so bizarre exceptions like machines that trap on signed overflow.

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?

OK, but to me "knows C" (the predicate in my statement) certainly means being familiar with the standard, not necessarily by reading it, I am sure there are lots of good books on C that have a good account of the rules (K&R is clear enough on this particular issue).


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]