This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Document arithmetic overflow semantics
- From: Roger Sayle <roger at www dot eyesopen dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>, <gcc-patches at gcc dot gnu dot org>, <gcc at gcc dot gnu dot org>
- Date: Thu, 13 Feb 2003 10:29:11 -0700 (MST)
- Subject: Re: [PATCH] Document arithmetic overflow semantics
On Thu, 13 Feb 2003, Richard Henderson wrote:
> > I completely disagree, and so do GCC's patch reviewers.
>
> Huh? I for one agree with Kenner. Using the undefinedness of
> something to infer that it doesn't happen is well-established.
I apologise. I'm sure I've had constant folding optimizations rejected
in the past for assuming overflow semantics. At the time I posted this
claim, the "-A - B" patch that I was thinking off not only removed
overflows that occured in the original, but also introduces overflows
that didn't occur in the original. I now realize that this is not
quite the same thing.
I'd previously had several floating point transformations rejected,
until I finally resolved the issue by introducing the flag_signaling_nans
option, that separated out the issues. And today GCC's optimizers are
much improved for it. Not that anyone used GCC with sNANs then or now,
but it helped appease the paranoia.
Roger
--