This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][4.3] Deprecate -ftrapv
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- To: FX Coudert <fxcoudert at gmail dot com>
- Cc: GCC Development <gcc at gcc dot gnu dot org>, ddaney at avtrex dot com, Richard Guenther <richard dot guenther at gmail dot com>, dewar at adacore dot com, mark at codesourcery dot com
- Date: Thu, 06 Mar 2008 15:38:37 +0100
- Subject: Re: [PATCH][4.3] Deprecate -ftrapv
- References: <4B9FFA6D-CAA5-4A3C-A36A-CA462DE8AB42@gmail.com>
FX Coudert wrote:
[ Sorry, I'm way, way behind ]
C: integer overflow undefined, checking desirable at least for
debugging purposes.
I think latest Fortran is same as C, can someone confirm?
Yes, it is. Overflow undefined and no checking required; I think very
few Fortran users actually use (or would use) checking on signed overflow.
In Fortran, integers are used to index arrays. So if you want integer
overflow checking, use -fbounds-check :-)
--
Toon Moene - e-mail: toon@moene.indiv.nluug.nl - phone: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
At home: http://moene.indiv.nluug.nl/~toon/
Progress of GNU Fortran: http://gcc.gnu.org/ml/gcc/2008-01/msg00009.html