This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]