aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.c
diff options
context:
space:
mode:
authorBrendan Kehoe <brendan@gcc.gnu.org>1998-02-18 05:38:57 -0500
committerBrendan Kehoe <brendan@gcc.gnu.org>1998-02-18 05:38:57 -0500
commitd9525bec09ede003c7bf29bc0ceef27ec083e4a9 (patch)
tree0c6d9928460c8ea947b19cb363645ecf536b2a56 /gcc/tree.c
parentf9a366acb519c4d2652cac65d3644030b2223e28 (diff)
downloadgcc-d9525bec09ede003c7bf29bc0ceef27ec083e4a9.zip
gcc-d9525bec09ede003c7bf29bc0ceef27ec083e4a9.tar.gz
gcc-d9525bec09ede003c7bf29bc0ceef27ec083e4a9.tar.bz2
tree.h (merge_machine_{type,decl}_attributes): Declare.
./ChangeLog: * tree.h (merge_machine_{type,decl}_attributes): Declare. (split_specs_attrs, strip_attrs): Add prototypes. * tree.c (merge_machine_{type,decl}_attributes): New functions. * c-decl.c (duplicate_decls): Call merge_machine_decl_attributes. Update olddecl's attributes too. * c-common.c (strip_attrs): New function. * c-typeck.c (common_type): Call merge_machine_type_attributes. * varasm.c (make_function_rtl): New target macro REDO_SECTION_INFO_P. (make_decl_rtl): Likewise. * c-decl.c (shadow_tag_warned): Call split_specs_attrs. ./cp/ChangeLog: * decl.c (duplicate_decls): Call merge_machine_decl_attributes. Update olddecl's attributes too. (strip_attrs): Remove function. * typeck.c (common_type): Call merge_machine_type_attributes. From-SVN: r18065
Diffstat (limited to 'gcc/tree.c')
-rw-r--r--gcc/tree.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/gcc/tree.c b/gcc/tree.c
index 1f13532..d33563b 100644
--- a/gcc/tree.c
+++ b/gcc/tree.c
@@ -3501,6 +3501,36 @@ merge_attributes (a1, a2)
}
return attributes;
}
+
+/* Given types T1 and T2, merge their attributes and return
+ the result. */
+
+tree
+merge_machine_type_attributes (t1, t2)
+ tree t1, t2;
+{
+#ifdef MERGE_MACHINE_TYPE_ATTRIBUTES
+ return MERGE_MACHINE_TYPE_ATTRIBUTES (t1, t2);
+#else
+ return merge_attributes (TYPE_ATTRIBUTES (t1),
+ TYPE_ATTRIBUTES (t2));
+#endif
+}
+
+/* Given decls OLDDECL and NEWDECL, merge their attributes and return
+ the result. */
+
+tree
+merge_machine_decl_attributes (olddecl, newdecl)
+ tree olddecl, newdecl;
+{
+#ifdef MERGE_MACHINE_DECL_ATTRIBUTES
+ return MERGE_MACHINE_DECL_ATTRIBUTES (olddecl, newdecl);
+#else
+ return merge_attributes (DECL_MACHINE_ATTRIBUTES (olddecl),
+ DECL_MACHINE_ATTRIBUTES (newdecl));
+#endif
+}
/* Return a type like TYPE except that its TYPE_READONLY is CONSTP
and its TYPE_VOLATILE is VOLATILEP.