This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH][4.3] Deprecate -ftrapv
- From: Robert Dewar <dewar at adacore dot com>
- To: David Daney <ddaney at avtrex dot com>
- Cc: Mark Mitchell <mark at codesourcery dot com>, Richard Guenther <rguenther at suse dot de>, gcc-patches at gcc dot gnu dot org, gcc at gcc dot gnu dot org
- Date: Fri, 29 Feb 2008 21:07:40 -0500
- Subject: Re: [PATCH][4.3] Deprecate -ftrapv
- References: <Pine.LNX.firstname.lastname@example.org> <47C89DB1.email@example.com> <47C8A04D.firstname.lastname@example.org>
David Daney wrote:
Mark Mitchell wrote:
Richard Guenther wrote:
Why doesn't it work? Can it be made to work relatively easily? Do we
need functionality like this for Ada or Java?
This is a request to depcrecate -ftrapv which has numerous problems
making it not work as expected since a long time. As nobody seems
to have the energy to ensure it is working I propose to deprecate it
for GCC 4.3 to make it possible to remove it during 4.4 (and not
block removing libcall notes by it).
Java only traps on integer division by zero. As I understand it, this
is handled by a different mechanism.
The situation is:
Ada: integer overflow checking required (it's off by default in GNAT,
but you get required standard behavior by using -gnato, the reason
it is off by default is that the code is so horrible).
Java: integer overflow checking is prohibited, wrap around semantics
is required (IMO a horrible choice, but there you are!)
C: integer overflow undefined, checking desirable at least for
I think latest Fortran is same as C, can someone confirm?