This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: what optimizations are invalid in java?
- From: dewar at gnat dot com (Robert Dewar)
- To: aph at cambridge dot redhat dot com, dewar at gnat dot com
- Cc: gcc at gcc dot gnu dot org, java at gcc dot gnu dot org, jh at suse dot cz, tromey at redhat dot com
- Date: Wed, 13 Mar 2002 14:32:55 -0500 (EST)
- Subject: Re: what optimizations are invalid in java?
"if the dividend is the negative integer of largest possible magnitude
for its type, and the divisor is -1, then integer overflow occurs and
the result is equal to the dividend. Despite the overflow, no
exception is thrown in this case. On the other hand, if the value of
the divisor in an integer division is 0, then an ArithmeticException
is thrown."
That's probably a concession to the x86, which has a bug on this specific
point. It's really HORRIBLE to see Ada code specifically testing for this
case to determine whether to raise an exception :-(