+2003-12-20 Andrew Pinski <pinskia@physics.uc.edu>
+
+ Backport from mainline:
+ 2003-12-30 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/13507
+ * decl.c (duplicate_decls): Use build_type_attribute_variant to
+ merge attributes.
+
2003-12-30 Nathan Sidwell <nathan@codesourcery.com>
PR c++/13445
for anitipated built-ins, for exception lists, etc... */
else if (DECL_ANTICIPATED (olddecl))
{
- TYPE_ATTRIBUTES (TREE_TYPE (newdecl))
- = (*targetm.merge_type_attributes) (TREE_TYPE (olddecl),
- TREE_TYPE (newdecl));
- TREE_TYPE (olddecl) = TREE_TYPE (newdecl);
+ tree type = TREE_TYPE (newdecl);
+ tree attribs = (*targetm.merge_type_attributes)
+ (TREE_TYPE (olddecl), type);
+
+ type = build_type_attribute_variant (type, attribs);
+ TREE_TYPE (newdecl) = TREE_TYPE (olddecl) = type;
}
/* Whether or not the builtin can throw exceptions has no