This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Document arithmetic overflow semantics
- From: dewar at gnat dot com (Robert Dewar)
- To: jbuck at synopsys dot com, roger at www dot eyesopen dot com
- Cc: gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org,kenner at vlsi1 dot ultra dot nyu dot edu
- Date: Thu, 13 Feb 2003 14:10:10 -0500 (EST)
- Subject: 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).