This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: The utility of standard's semantics for overflow
- From: Olivier Galibert <galibert at pobox dot com>
- To: Dave Korn <dave dot korn at artimi dot com>
- Cc: 'Robert Dewar' <dewar at adacore dot com>,Theodore dot Papadopoulo at sophia dot inria dot fr,'Michael Veksler' <VEKSLER at il dot ibm dot com>, gcc at gcc dot gnu dot org
- Date: Wed, 29 Jun 2005 20:35:51 +0200
- Subject: Re: The utility of standard's semantics for overflow
- References: <42C29092.8070708@adacore.com> <SERRANOBWFXbEJSGdvy0000029b@SERRANO.CAM.ARTIMI.COM>
On Wed, Jun 29, 2005 at 02:12:40PM +0100, Dave Korn wrote:
> In fact, doesn't this suggest that in _most_ circumstances, *saturation*
> would be the best behaviour?
No, you'd be killing most emulators and a lot of virtual machine
implementations.
char x = (char)((unsigned char)y + (unsigned char)z)
is too ugly to live.
OG.