This is the mail archive of the gcc-patches@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: [PATCH] Document arithmetic overflow semantics


> 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).


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