Patch: Fix for PR java/4766
Per Bothner
per@bothner.com
Sun Nov 18 13:43:00 GMT 2001
Tom Tromey wrote:
> For PR java/4766:
> * jcf-write.c (generate_bytecode_insns) [TRY_FINALLY_EXPR]: Handle
case where `finally' clause can't complete normally.
This is OK.
Two concerns:
(1) This patch is basically an optimization. If we just added a
if (CAN_COMPLETE_NORMALLY (finally)) before the 'ret', would that
work (though less efficiently)? Otherwise, I'm wondering if we're
just papering over some more subtle bug.
(2) Does the compiler reject now reject the invalid bytecode (as
generated by the old compiler) with a reasonable error message?
Otherwise I wouldn't consider the PR fully fixed.
--
--Per Bothner
per@bothner.com http://www.bothner.com/per/
More information about the Java-patches
mailing list