Commit 0ecef3cf by Richard Kenner

(duplicate_decl): If making decl non-external, copy context from old

to new.

From-SVN: r11439
parent 9e18f575
......@@ -1843,6 +1843,8 @@ duplicate_decls (newdecl, olddecl, different_binding_level)
DECL_EXTERNAL (newdecl) = DECL_EXTERNAL (olddecl);
/* An extern decl does not override previous storage class. */
TREE_PUBLIC (newdecl) = TREE_PUBLIC (olddecl);
if (! DECL_EXTERNAL (newdecl))
DECL_CONTEXT (newdecl) = DECL_CONTEXT (olddecl);
}
else
{
......
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