From 4b4244e098f9625eb7625df28b3b35a183cbcf7f Mon Sep 17 00:00:00 2001 From: kan Date: Fri, 22 Aug 2003 03:14:37 +0000 Subject: Merge FreeBSD modifications into gcc 3.3.1-release: 1.3 suppress warnings on K&R main. --- contrib/gcc/c-decl.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'contrib/gcc/c-decl.c') diff --git a/contrib/gcc/c-decl.c b/contrib/gcc/c-decl.c index cba3fe5..801a734 100644 --- a/contrib/gcc/c-decl.c +++ b/contrib/gcc/c-decl.c @@ -1580,6 +1580,15 @@ duplicate_decls (newdecl, olddecl, different_binding_level) Update OLDDECL to be the same. */ DECL_ATTRIBUTES (olddecl) = DECL_ATTRIBUTES (newdecl); + /* If OLDDECL had its DECL_RTL instantiated, re-invoke make_decl_rtl + so that encode_section_info has a chance to look at the new decl + flags and attributes. */ + if (DECL_RTL_SET_P (olddecl) + && (TREE_CODE (olddecl) == FUNCTION_DECL + || (TREE_CODE (olddecl) == VAR_DECL + && TREE_STATIC (olddecl)))) + make_decl_rtl (olddecl, NULL); + return 1; } -- cgit v1.1