check-init.c (check_init): If compiling to native, we don't see THROW_EXPR.
authorPer Bothner <bothner@cygnus.com>
Fri, 8 Jan 1999 15:50:10 +0000 (15:50 +0000)
committerPer Bothner <bothner@gcc.gnu.org>
Fri, 8 Jan 1999 15:50:10 +0000 (07:50 -0800)
@
* check-init.c (check_init):  If compiling to native, we don't
see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).

From-SVN: r24575

gcc/java/ChangeLog
gcc/java/check-init.c

index 4adf90820208c9a039a0f71d7d422fb53002a8a0..3e25bdf511edee980a54e39b359dabdcf971c50f 100644 (file)
@@ -1,3 +1,8 @@
+Fri Jan  8 15:48:03 1999  Per Bothner  <bothner@cygnus.com>
+
+       * check-init.c (check_init):  If compiling to native, we don't
+       see THROW_EXPR.  Instead, look for a call to throw_node (_Jv_Throw).
+
 1999-01-08  Tom Tromey  <tromey@cygnus.com>
 
        * parse-scan.y (variable_declarator_id): Set or increment
index c4b73e2921cd581fbf670346b38f177143903939..ec3e5adb1735b2dda194ad9f1cd1ed6a086ac032 100644 (file)
@@ -571,12 +571,12 @@ check_init (exp, before)
     case THROW_EXPR:
       if (TREE_OPERAND (exp, 0))
        check_init (TREE_OPERAND (exp, 0), before);
-      SET_ALL (before);
-      return;
+      goto never_continues;
 
     case ERROR_MARK:
+    never_continues:
       SET_ALL (before);
-      break;
+      return;
       
     case COND_EXPR:
     case TRUTH_ANDIF_EXPR:
@@ -649,11 +649,16 @@ check_init (exp, before)
     case NEW_CLASS_EXPR:
     case CALL_EXPR:
       {
+       tree func = TREE_OPERAND (exp, 0);
        tree x = TREE_OPERAND (exp, 1);
-       check_init (TREE_OPERAND (exp, 0), before);
-       
+       if (TREE_CODE (func) == ADDR_EXPR)
+         func = TREE_OPERAND (func, 0);
+       check_init (func, before);
+
        for ( ;  x != NULL_TREE;  x = TREE_CHAIN (x))
          check_init (TREE_VALUE (x), before);
+       if (func == throw_node)
+         goto never_continues;
       }
       break;