This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH][4.3] Deprecate -ftrapv


On Sat, 2008-03-01 at 09:05 -0500, Robert Dewar wrote:

> Note that in Ada, you can often avoid one or both ends of
> the range check, e.g.
> 
>      type R is integer range 1 .. 10;
> 
>      RV : R;
> 
>      R := R + 1;
> 
> no need for double length arithmetic here, you just check that the
> result is not greater than 10.

Isn't that a job for VRP? I remember long discussions about VRP
and Ada (I don't remenber the conclusion though), if something is done
to replace trapv it has to taken that into account.

Laurent


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]