This is the mail archive of the gcc-patches@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 RFC: -fstrict-overflow


> what about to fix it? IMHO, it could be made much more reliable if
> instead of testing -ftrapv everywhere, we just instrumented the program
> early (perhaps during gimplification, or in a separate pass immediatelly
> after it), and then just behaved the same way as with -fno-wrapv?

We would be very interested in such an approach for the -gnato option of the 
Ada compiler.  Currently it is entirely implemented in the front-end, but at 
the cost of runtime efficiency; it could be piggybacked on a working, more 
high-level implementation of -ftrapv instead.  The ACATS testsuite could be 
used as a regression tester for the implementation, it contains several tests 
raising an exception on overflow (see testsuite/ada/acats/overflow.lst).

-- 
Eric Botcazou


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