INT_MIN % -1

Robert Dewar dewar@gnat.com
Wed Dec 1 11:40:00 GMT 2004


Paul Schlie wrote:

> Understood, as ADA programs may bound the domain of it's variables
> guaranteeing that the operation would be well behaved within the bounds of
> it's operands; but wonder if saving a few cycles out of the likely several
> required for a divide or modulo operation would likely be worth the added,
> albeit minor, complexity?
> 
> 
I think so, it's by far the most common case, and it is a pity to take a hit
in the normal case in Ada just so that a pathological case in C can be done
right :-) Actually even in C, you can often tell that the bad case is impossible.

P.S. The language is Ada, not ADA, it's a woman's name. ADA is the Americans with
Disability Act (among others) and there is a great poster of Clinton saying "I want
you to pay attention to ADA!" :-)



More information about the Gcc mailing list