Where does the C standard describe overflow of signed integers?
Robert Dewar
dewar@adacore.com
Thu Jul 14 01:59:00 GMT 2005
Paul Schlie wrote:
> Although I don't intend to extend the debate; doesn't anyone find it curious
> that given this hard requirement, combined with the fact that all current
> machine architectures rely on 2's complement signed integer representation
> to eliminate the otherwise necessity for distinct signed integer arithmetic
> operations; that by extension unsigned and signed integer arithmetic
> operations are behaviorally equivalent all current machine implementations
> (as well as likely future implementations for the same reasons);
nonsense! -1/1 = 0 signed, -1 unsigned
-1 < 1 signed, -1>1 unsigned
More information about the Gcc
mailing list