[PATCH] Document arithmetic overflow semantics

Robert Dewar dewar@gnat.com
Thu Feb 13 19:22:00 GMT 2003


> But undefined overflow is a superset of two's complement semantics

I don't understand the terminology here. Are you using "two's comlement" to
imply unsigned wrap around, i.e. throw away carry and ignore overflow. If so,
that's a bit confusing, since it presupposes the conclusion. The issue with
twos complement signed arithmetic is preciesely what happens on overflow (that's
the only thing that distinguishes it from unsigned).



More information about the Gcc mailing list