This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: INT_MIN % -1
- From: Robert Dewar <dewar at gnat dot com>
- To: Paul Schlie <schlie at comcast dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 01 Dec 2004 06:40:16 -0500
- Subject: Re: INT_MIN % -1
- References: <BDD2A300.819B%schlie@comcast.net>
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!" :-)