aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@gcc.gnu.org>1998-04-09 20:36:49 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>1998-04-09 20:36:49 +0000
commitfcad5cf5e8bb2fc25e7971cf9f706581904f2a3e (patch)
tree14a98593fea82ef2bec27b45b1c28a9433b9c53e
parenta177473334c4f427428326747b97656a0af049fa (diff)
downloadgcc-fcad5cf5e8bb2fc25e7971cf9f706581904f2a3e.zip
gcc-fcad5cf5e8bb2fc25e7971cf9f706581904f2a3e.tar.gz
gcc-fcad5cf5e8bb2fc25e7971cf9f706581904f2a3e.tar.bz2
cp-tree.h (start_decl): Update prototype.
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
-rw-r--r--gcc/cp/ChangeLog28
-rw-r--r--gcc/cp/cp-tree.h7
-rw-r--r--gcc/cp/typeck.c4
3 files changed, 34 insertions, 5 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 64f5a59..3db48c9 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 3da7f89..dd2e087 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -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));
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index c39bbb9..9aac340 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -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);