what optimizations are invalid in java?

Robert Dewar dewar@gnat.com
Wed Mar 13 11:33:00 GMT 2002


"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 :-(


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /