Commit bb36cc75 by David Mandelin Committed by Taras Glek

decl.c (duplicate_decls): Preserve parameter attributes.

2009-05-13  David Mandelin <dmandelin@mozilla.com>:
gcc/
      * decl.c (duplicate_decls): Preserve parameter attributes.

From-SVN: r147514
parent 4ed7f970
2009-05-13 David Mandelin <dmandelin@mozilla.com>:
* decl.c (duplicate_decls): Preserve parameter attributes.
2009-05-14 Dave Korn <dave.korn.cygwin@gmail.com>
* config/i386/msformat-c.c (ms_printf_length_specs): Use enumeration
......
......@@ -1913,6 +1913,17 @@ duplicate_decls (tree newdecl, tree olddecl, bool newdecl_is_friend)
{
tree parm;
/* Merge parameter attributes. */
tree oldarg, newarg;
for (oldarg = DECL_ARGUMENTS(olddecl),
newarg = DECL_ARGUMENTS(newdecl);
oldarg && newarg;
oldarg = TREE_CHAIN(oldarg), newarg = TREE_CHAIN(newarg)) {
DECL_ATTRIBUTES (newarg)
= (*targetm.merge_decl_attributes) (oldarg, newarg);
DECL_ATTRIBUTES (oldarg) = DECL_ATTRIBUTES (newarg);
}
if (DECL_TEMPLATE_INSTANTIATION (olddecl)
&& !DECL_TEMPLATE_INSTANTIATION (newdecl))
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment