diff options
author | Jason Merrill <jason@redhat.com> | 2003-01-03 14:29:51 -0500 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2003-01-03 14:29:51 -0500 |
commit | 6cce57b0d073bc545a9a2855885e65a4ca43ce4d (patch) | |
tree | ed397435e12ce43cd81067953111919e1628866f /gcc/c-decl.c | |
parent | 9c91c80bb7595b799dc5c653de60f9c9d5898d14 (diff) | |
download | gcc-6cce57b0d073bc545a9a2855885e65a4ca43ce4d.zip gcc-6cce57b0d073bc545a9a2855885e65a4ca43ce4d.tar.gz gcc-6cce57b0d073bc545a9a2855885e65a4ca43ce4d.tar.bz2 |
c-common.c (finish_fname_decls): Put the DECL_STMTs inside the outermost scope.
* c-common.c (finish_fname_decls): Put the DECL_STMTs inside the
outermost scope.
* c-decl.c (c_make_fname_decl): Push the decls there, too.
cp/
* decl.c (cp_make_fname_decl): Push the decls inside the
outermost scope.
From-SVN: r60848
Diffstat (limited to 'gcc/c-decl.c')
-rw-r--r-- | gcc/c-decl.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/c-decl.c b/gcc/c-decl.c index 8c86bc0..fde8c48 100644 --- a/gcc/c-decl.c +++ b/gcc/c-decl.c @@ -2545,6 +2545,18 @@ c_make_fname_decl (id, type_dep) DECL_INITIAL (decl) = init; TREE_USED (decl) = 1; + + if (current_function_decl) + { + /* Add the decls to the outermost block. */ + struct binding_level *b = current_binding_level; + struct binding_level *old = b; + while (b->level_chain->parm_flag == 0) + b = b->level_chain; + current_binding_level = b; + pushdecl (decl); + current_binding_level = old; + } finish_decl (decl, init, NULL_TREE); |