J
Joona I Palaste
JKop <[email protected]> scribbled the following
The overflow of unsigned integer types is perfectly defined in ISO
standard C. The values "roll over", which means that if a value is
larger than the maximum, the maximum is substracted from it. For
example suppose a 16-bit unsigned short. Attempting to store 65536
into it will store 0, attempting to store 65537 will store 1, and so
on.
The overflow of *signed* integer types is not defined.
Gordon Burditt posted:
This I don't even want to understand.
If you're telling me that unsigned ints overflow in nice eloquent way, then
my only conclusion is that there's an amorphous blob of memory being wasted.
The overflow of unsigned integer types is perfectly defined in ISO
standard C. The values "roll over", which means that if a value is
larger than the maximum, the maximum is substracted from it. For
example suppose a 16-bit unsigned short. Attempting to store 65536
into it will store 0, attempting to store 65537 will store 1, and so
on.
The overflow of *signed* integer types is not defined.