This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][4.3] Deprecate -ftrapv
- From: "Richard Guenther" <richard dot guenther at gmail dot com>
- To: "Robert Dewar" <dewar at adacore dot com>
- Cc: "Paolo Bonzini" <bonzini at gnu dot org>, gcc at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sat, 1 Mar 2008 15:00:23 +0100
- Subject: Re: [PATCH][4.3] Deprecate -ftrapv
- References: <Pine.LNX.4.64.0803010041110.4133@zhemvz.fhfr.qr> <47C8B7F3.2000508@adacore.com> <fqbn6k$d5j$1@ger.gmane.org> <47C960D8.4080706@adacore.com>
On Sat, Mar 1, 2008 at 2:57 PM, Robert Dewar <dewar@adacore.com> wrote:
> Paolo Bonzini wrote:
> >> Seems a pity, this feature is really needed for Ada, which requires
> >> efficient overflow checking for signed arithmetic, and it seems
> >> useful for C, where signed overflow is undefined, and it would be
> >> nice to enable trapping.
> >>
> >> Right now, Ada uses really horrible double length arithmetic to
> >> do trapping.
> >
> > It's not the only way to do it though, and it's best to reimplement
> > -ftrapv in terms of GIMPLE.
>
> Right ... from Ada's point of view, it is of course only of limited
> value to have an implementation of -ftrapv that is equally horrible :-)
>
> >
> > I'm for deprecating -ftrapv and reimplementing it. I could mentor a
> > GSOC project for reimplementation of -ftrapv.
>
> Perhaps if the current implementation is too broken, that might be
> the most constructive approach ...
I agree.
Richard.