cp-tree.h (start_decl): Update prototype.
authorBenjamin Kosnik <bkoz@gcc.gnu.org>
Thu, 9 Apr 1998 20:36:49 +0000 (20:36 +0000)
committerBenjamin Kosnik <bkoz@gcc.gnu.org>
Thu, 9 Apr 1998 20:36:49 +0000 (20:36 +0000)
a
Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
        * cp-tree.h (start_decl):  Update prototype.
        * decl.c (start_decl):  Like the C version, new parameters
        for the attributes.  Call cplus_decl_attributes here,
        (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
        (grokdeclarator):  Pass NULL for new start_decl arguments.
        * pt.c (tsubst_expr):  Likewise.
        * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
* typeck.c (common_type): Check TYPE_MAIN_VARIANT.
* lex.c (build_lang_decl): Add lang_name_java.
* class.c (push_lang_context): Add lang_name_java.
* method.c (build_mangled_name): Check for is_java_type.
Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
* decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
* call.c (build_scoped_method_call): Check for TREE_CODE for
VOID_TYPE instead of type ==  void_type_node.
(build_method_call): Ditto.
* decl.c (lookup_name_real): Ditto.
(grokdeclarator): Ditto.
(start_decl): Ditto.
(grokparms): Ditto.
(start_function): Ditto.
(finish_function): Ditto.
(start_method): Ditto.
also fixes g++/15415

From-SVN: r19072

gcc/cp/ChangeLog
gcc/cp/cp-tree.h
gcc/cp/typeck.c

index 64f5a592cb1ee8d06c6a50d992083c7f8462579e..3db48c9be3a201c6b9832c26f38da968043dfe05 100644 (file)
@@ -1,3 +1,31 @@
+Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
+
+        * cp-tree.h (start_decl):  Update prototype.
+        * decl.c (start_decl):  Like the C version, new parameters
+        for the attributes.  Call cplus_decl_attributes here,
+        (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
+        (grokdeclarator):  Pass NULL for new start_decl arguments.
+        * pt.c (tsubst_expr):  Likewise.
+        * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
+       * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
+       * lex.c (build_lang_decl): Add lang_name_java.
+       * class.c (push_lang_context): Add lang_name_java.
+       * method.c (build_mangled_name): Check for is_java_type.
+
+Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
+
+       * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
+       * call.c (build_scoped_method_call): Check for TREE_CODE for
+       VOID_TYPE instead of type ==  void_type_node.
+       (build_method_call): Ditto.
+       * decl.c (lookup_name_real): Ditto.
+       (grokdeclarator): Ditto.
+       (start_decl): Ditto.
+       (grokparms): Ditto.
+       (start_function): Ditto.
+       (finish_function): Ditto.
+       (start_method): Ditto.
+
 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
 
        * lex.c (finput): New variable.
index 3da7f89178a50e1004e847d2a684b044c8e87dc9..dd2e087c153ab5d1c6eb7fe517b03e8830b40193 100644 (file)
@@ -358,7 +358,7 @@ enum cplus_tree_code {
 };
 #undef DEFTREECODE
 
-enum languages { lang_c, lang_cplusplus };
+enum languages { lang_c, lang_cplusplus, lang_java };
 
 /* Macros to make error reporting functions' lives easier.  */
 #define TYPE_IDENTIFIER(NODE) (DECL_NAME (TYPE_NAME (NODE)))
@@ -1646,7 +1646,8 @@ extern tree previous_class_type;
 extern tree current_class_ref;
 extern int current_class_depth;
 
-extern tree current_lang_name, lang_name_cplusplus, lang_name_c;
+extern tree current_lang_name;
+extern tree lang_name_cplusplus, lang_name_c, lang_name_java;
 
 /* Points to the name of that function. May not be the DECL_NAME
    of CURRENT_FUNCTION_DECL due to overloading */
@@ -2162,7 +2163,7 @@ extern tree define_function
               void (*) (tree), char *));
 extern void shadow_tag                         PROTO((tree));
 extern tree groktypename                       PROTO((tree));
-extern tree start_decl                         PROTO((tree, tree, int));
+extern tree start_decl                         PROTO((tree, tree, int, tree, tree));
 extern void start_decl_1                       PROTO((tree));
 extern void cp_finish_decl                     PROTO((tree, tree, tree, int, int));
 extern void finish_decl                                PROTO((tree, tree, tree));
index c39bbb956ac6b3013b3ad0103d1933f6493d3fd7..9aac34050cef4fc0f2b20776ecc0c0923a432fd3 100644 (file)
@@ -529,8 +529,8 @@ common_type (t1, t2)
 
     case RECORD_TYPE:
     case UNION_TYPE:
-      my_friendly_assert (TYPE_MAIN_VARIANT (t1) == t1
-                         && TYPE_MAIN_VARIANT (t2) == t2, 306);
+      t1 = TYPE_MAIN_VARIANT (t1);
+      t2 = TYPE_MAIN_VARIANT (t2);
 
       if (DERIVED_FROM_P (t1, t2) && binfo_or_else (t1, t2))
        return build_type_attribute_variant (t1, attributes);