Ada front-end depends on signed overflow

Robert Dewar dewar@adacore.com
Fri Jun 3 21:26:00 GMT 2005


Geert Bosch wrote:

> For Ada, I propose we make the following changes:
>   - by default, enable overflow checks using -ftrapv

This won't work, we generate plenty of cases of operations
where we definitely don't want a check, and we don't set the
flag, but currently the flag is ignored by gcc/gigi, we would
have to adjust gigi to switch to unsigned for cases where the
check overflow flagwas not set

>     (jay, we should be able to get rid of -gnato finally!)
>   - with checks suppressed, use -fwrapv.

We really need to do this on an operation by operation basis,
since in Ada checks can be suppressed on an operation by
operation basis!





More information about the Gcc mailing list