OSDN Git Service

d
authorbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 13 Dec 1998 17:51:04 +0000 (17:51 +0000)
committerbothner <bothner@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 13 Dec 1998 17:51:04 +0000 (17:51 +0000)
* parse.y (patch_method_invocation):  If class_decl is null
(e.g. an array type), use original type.
* parse.y (check_thrown_exceptions):  Temporary hack to suppress
errors about uncaught exception from clone (of array, specifically).

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24299 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/java/parse.c

index 64c302b..527f588 100644 (file)
@@ -9278,6 +9278,7 @@ patch_method_invocation (patch, primary, where, is_static, ret_decl)
          /* 2- Do the layout of the class where the last field
             was found, so we can search it. */
          class_decl = resolve_and_layout (type, NULL_TREE);
+         if (class_decl != NULL_TREE)
          type = TREE_TYPE (class_decl);
 
          /* 3- Retrieve a filtered list of method matches, Refine
@@ -13493,6 +13494,11 @@ check_thrown_exceptions (location, decl)
        throws = TREE_CHAIN (throws)) 
     if (!check_thrown_exceptions_do (TREE_VALUE (throws)))
       {
+#if 1
+       /* Temporary hack to suppresses errors about cloning arrays. FIXME */
+       if (DECL_NAME (decl) == get_identifier ("clone"))
+         continue;
+#endif
        EXPR_WFL_LINECOL (wfl_operator) = location;
        parse_error_context 
          (wfl_operator, "Exception `%s' must be caught, or it must be "