From: Richard Kenner Date: Tue, 5 Mar 1996 12:51:14 +0000 (-0500) Subject: (duplicate_decl): If making decl non-external, copy context from old X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0ecef3cf11fb05a70152a8a4d4ff915b99811404;p=gcc.git (duplicate_decl): If making decl non-external, copy context from old to new. From-SVN: r11439 --- diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 65dfa01270e..b7379560f74 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -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 {