[PATCH] Java: @deprecated handling, division by zero detection.

Alexandre Petit-Bianco apbianco@cygnus.com
Tue Aug 28 09:08:00 GMT 2001


Andrew Haley writes:

> Interesting.  Is compile time detection of division by zero
> compulsory?

Yes. 15.17.2:

   On the other hand, if the value of the divisor in an integer
   division is 0, then an ArithmeticException is thrown.

Which the Jacks people interpreted as a run-time check. As a matter of
fact, this is what javac and jikes are doing. This patch obviously
goes to far and should limit its action to integral types. I caught
that yesterday as I was trying to build mauve -- a patch should follow
shortly once I get Mauve to build.

./A



More information about the Gcc-patches mailing list