aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-decl.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/c-decl.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/c-decl.c')
-rw-r--r--gcc/c-decl.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c
index ed23500..c3cf4fc 100644
--- a/gcc/c-decl.c
+++ b/gcc/c-decl.c
@@ -1422,7 +1422,8 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
char *errmsg = 0;
if (TREE_CODE_CLASS (TREE_CODE (olddecl)) == 'd')
- DECL_MACHINE_ATTRIBUTES (newdecl) = DECL_MACHINE_ATTRIBUTES (olddecl);
+ DECL_MACHINE_ATTRIBUTES (newdecl)
+ = merge_machine_decl_attributes (olddecl, newdecl);
if (TREE_CODE (newtype) == ERROR_MARK
|| TREE_CODE (oldtype) == ERROR_MARK)
@@ -2000,6 +2001,10 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
DECL_UID (olddecl) = olddecl_uid;
}
+ /* NEWDECL contains the merged attribute lists.
+ Update OLDDECL to be the same. */
+ DECL_MACHINE_ATTRIBUTES (olddecl) = DECL_MACHINE_ATTRIBUTES (newdecl);
+
return 1;
}
@@ -3530,9 +3535,14 @@ shadow_tag_warned (declspecs, warned)
{
int found_tag = 0;
register tree link;
+ tree specs, attrs;
pending_invalid_xref = 0;
+ /* Remove the attributes from declspecs, since they will confuse the
+ following code. */
+ split_specs_attrs (declspecs, &specs, &attrs);
+
for (link = declspecs; link; link = TREE_CHAIN (link))
{
register tree value = TREE_VALUE (link);