This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Document arithmetic overflow semantics
- From: dewar at gnat dot com (Robert Dewar)
- To: fjh at cs dot mu dot OZ dot AU, 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 13:52:06 -0500 (EST)
- Subject: Re: [PATCH] Document arithmetic overflow semantics
> The fact that the behaviour of overflow is undefined in C, C++ and Ada
> does not mean that "overflow cannot occur". Quite clearly overflows do
> occur, and the optimizers are paralyzed by the semantics in this event.
Since this quote is being repeated many times, it is perhaps worth
emphasizing that overflow *is* defined in Ada, and indeed the most
important thing that Ada needs from gcc is efficient code for arithmetic
operations that trap on overflow :-)