Ada front-end depends on signed overflow

Robert Dewar dewar@adacore.com
Tue Jun 7 08:57:00 GMT 2005


Florian Weimer wrote:
> * Robert Dewar:
> 
> 
>>Defintiely not, integer overflow generates async traps on very few
>>architectures. Certainly synchronous traps can be generated (e.g.
>>with into on the x86).
> 
> 
> Or the JO jump instruction.  Modern CPUs choke on the INTO
> instruction.

Well INTO is still the best choice if you worry about code size.
Furthermore, it would be interesting to know what the actual
pragmatic effect of choke is, by comparing:

1. no checks
2. current software checks
3. into style checks
4. checks using jo

on real applications (not an easy test to do unfortunately)



More information about the Gcc mailing list