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
This commit is contained in:
David Mandelin 2009-05-14 01:27:15 +00:00 committed by Taras Glek
parent 4ed7f970f4
commit bb36cc7542
2 changed files with 15 additions and 0 deletions

View file

@ -1,3 +1,7 @@
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

View file

@ -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))
{