aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1995-06-22 22:45:46 -0400
committerRichard Kenner <kenner@gcc.gnu.org>1995-06-22 22:45:46 -0400
commit9fffd09332c475d2eeb704daa7d488e14d7cbf79 (patch)
tree4c74cd05acd38d725a9a6fde011fac977d365678 /gcc
parent3b98dc43ed5e03846cae2cf761f3cdf882fb8c41 (diff)
downloadgcc-9fffd09332c475d2eeb704daa7d488e14d7cbf79.zip
gcc-9fffd09332c475d2eeb704daa7d488e14d7cbf79.tar.gz
gcc-9fffd09332c475d2eeb704daa7d488e14d7cbf79.tar.bz2
(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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/decl.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index 957eebe..7516fef 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
{