Question about purge_unchecked_exceptions
Alexandre Petit-Bianco
apbianco@cygnus.com
Thu Aug 23 18:58:00 GMT 2001
Tom Tromey writes:
> The Method documentation says that it will return the "declared"
> exceptions. But does this necessarily mean the ones declared in the
> source? Or just in the class file?
OK, I see what you're getting at. How about that?
./A
2001年08月23日 Alexandre Petit-Bianco <apbianco@redhat.com>
* parse.y (java_complete_expand_method): Unconditionally save and
restore the unpurged exception list.
Index: parse.y
===================================================================
RCS file: /cvs/gcc/gcc/gcc/java/parse.y,v
retrieving revision 1.301
diff -u -p -r1.301 parse.y
--- parse.y 2001年08月22日 15:27:35 1.301
+++ parse.y 2001年08月24日 01:48:32
@@ -7918,10 +7981,9 @@ java_complete_expand_method (mdecl)
current_this = (!METHOD_STATIC (mdecl) ?
BLOCK_EXPR_DECLS (DECL_FUNCTION_BODY (mdecl)) : NULL_TREE);
- /* Purge the `throws' list of unchecked exceptions. If we're doing
- xref, save a copy of the list and re-install it later. */
- if (flag_emit_xref)
- exception_copy = copy_list (DECL_FUNCTION_THROWS (mdecl));
+ /* Purge the `throws' list of unchecked exceptions (we save a copy
+ of the list and re-install it later.) */
+ exception_copy = copy_list (DECL_FUNCTION_THROWS (mdecl));
purge_unchecked_exceptions (mdecl);
/* Install exceptions thrown with `throws' */
@@ -7985,8 +8047,7 @@ java_complete_expand_method (mdecl)
abort ();
/* Restore the copy of the list of exceptions if emitting xrefs. */
- if (flag_emit_xref)
- DECL_FUNCTION_THROWS (mdecl) = exception_copy;
+ DECL_FUNCTION_THROWS (mdecl) = exception_copy;
}
/* For with each class for which there's code to generate. */
More information about the Java
mailing list