aboutsummaryrefslogtreecommitdiff
path: root/gcc/java/verify.c
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2002-09-05 13:24:41 +0000
committerAndrew Haley <aph@gcc.gnu.org>2002-09-05 13:24:41 +0000
commitb139fcfd92b72e68b12bead6d3486fb737b47193 (patch)
treec4640e65d1a3edd785878c258a17aaf2680193ca /gcc/java/verify.c
parentf373d4c761d558910774264f085e117f6c8cf791 (diff)
downloadgcc-b139fcfd92b72e68b12bead6d3486fb737b47193.zip
gcc-b139fcfd92b72e68b12bead6d3486fb737b47193.tar.gz
gcc-b139fcfd92b72e68b12bead6d3486fb737b47193.tar.bz2
verify.c (verify_jvm_instructions): Allow exception handler inside code that is being protected, but generate a warning.
2002-08-28 Andrew Haley <aph@redhat.com> * verify.c (verify_jvm_instructions): Allow exception handler inside code that is being protected, but generate a warning. * except.c (link_handler): Initialize `expanded' in new eh_range. (binding_depth, is_class_level, current_pc): Declare extern. From-SVN: r56842
Diffstat (limited to 'gcc/java/verify.c')
-rw-r--r--gcc/java/verify.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gcc/java/verify.c b/gcc/java/verify.c
index b81927e..c3b3b98 100644
--- a/gcc/java/verify.c
+++ b/gcc/java/verify.c
@@ -471,7 +471,6 @@ verify_jvm_instructions (jcf, byte_ops, length)
if (start_pc < 0 || start_pc >= length
|| end_pc < 0 || end_pc > length || start_pc >= end_pc
|| handler_pc < 0 || handler_pc >= length
- || (handler_pc >= start_pc && handler_pc < end_pc)
|| ! (instruction_bits [start_pc] & BCODE_INSTRUCTION_START)
|| (end_pc < length &&
! (instruction_bits [end_pc] & BCODE_INSTRUCTION_START))
@@ -482,6 +481,9 @@ verify_jvm_instructions (jcf, byte_ops, length)
return 0;
}
+ if (handler_pc >= start_pc && handler_pc < end_pc)
+ warning ("exception handler inside code that is being protected");
+
add_handler (start_pc, end_pc,
lookup_label (handler_pc),
catch_type == 0 ? NULL_TREE