In many places, I read that unsigned integer overflows are clearly defined in C, as opposed to signed ones.
Is the same not enough?
For example:
unsigned int x = -1;
Thank.
I cannot remember where, but I read somewhere that the arithmetic of unsigned integer types is modular, so if that were the case, then -1 == UINT_MAX mod (UINT_MAX + 1).
c types integer integer-overflow underflow
snap May 03 '10 at 19:05 2010-05-03 19:05
source share