Handle new'ing of Java classes.
authorPer Bothner <bothner@gcc.gnu.org>
Thu, 20 Aug 1998 16:43:59 +0000 (09:43 -0700)
committerPer Bothner <bothner@gcc.gnu.org>
Thu, 20 Aug 1998 16:43:59 +0000 (09:43 -0700)
(
Handle new'ing of Java classes.
* init.c (build_class_classref):  New function.
(build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
constructor does not return this;  don't need to exception-protect.
* pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
* decl2.c (acceptable_java_type):  Handle template-derived types.

From-SVN: r21880

gcc/cp/pt.c

index a04921cfb81799174a66aa92d02e8e69420b0dbd..73b00c715f17aee5362d32a6585d1f68782031be 100644 (file)
@@ -3394,6 +3394,7 @@ lookup_template_class (d1, arglist, in_decl, context, entering_scope)
            = CLASSTYPE_DECLARED_CLASS (template_type);
          CLASSTYPE_GOT_SEMICOLON (t) = 1;
          SET_CLASSTYPE_IMPLICIT_INSTANTIATION (t);
+         TYPE_FOR_JAVA (t) = TYPE_FOR_JAVA (template_type);
        }
 
       /* If we called tsubst_enum above, this information will already