From 9fffd09332c475d2eeb704daa7d488e14d7cbf79 Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Thu, 22 Jun 1995 22:45:46 -0400 Subject: [PATCH] (start_function): For pre-parsed functions, layout all of the parm decls again. (grokvardecl): TREE_PUBLIC depends on DECL_THIS_EXTERN, not DECL_EXTERNAL. From-SVN: r10048 --- gcc/cp/decl.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 957eebec5fa..7516fef1e5d 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -7380,7 +7380,7 @@ grokvardecl (type, declarator, specbits, initialized, constp) else if (toplevel_bindings_p ()) { TREE_PUBLIC (decl) = (RIDBIT_NOTSETP (RID_STATIC, specbits) - && (DECL_EXTERNAL (decl) || ! constp)); + && (DECL_THIS_EXTERN (decl) || ! constp)); TREE_STATIC (decl) = ! DECL_EXTERNAL (decl); } /* Not at top level, only `static' makes a static definition. */ @@ -11137,6 +11137,14 @@ start_function (declspecs, declarator, raises, pre_parsed_p) /* In a fcn definition, arg types must be complete. */ require_complete_types_for_parms (last_function_parms); + + /* In case some arg types were completed since the declaration was + parsed, fix up the decls. */ + { + tree t = last_function_parms; + for (; t; t = TREE_CHAIN (t)) + layout_decl (t, 0); + } } else { -- 2.30.2