From ad16ae7f128edb825803b0caff4ede85ffaa5087 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Wed, 12 Nov 2003 22:20:34 +0000 Subject: decl.c (cp_make_fname_decl): When creating a top-level __FUNCTION__-like symbol, do register it with pushdecl. * decl.c (cp_make_fname_decl): When creating a top-level __FUNCTION__-like symbol, do register it with pushdecl. From-SVN: r73515 --- gcc/cp/ChangeLog | 3 +++ gcc/cp/decl.c | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'gcc') diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d8c54b0..f74ac5e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,5 +1,8 @@ 2003-11-12 Mark Mitchell + * decl.c (cp_make_fname_decl): When creating a top-level + __FUNCTION__-like symbol, do register it with pushdecl. + * decl.c (finish_case_label): Do not check that we are within a switch statement here. * parser.c (struct cp_parser): Add in_iteration_statement_p and diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index b1fd4f7..61bea50 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -3157,9 +3157,10 @@ cp_make_fname_decl (tree id, int type_dep) while (b->level_chain->kind != sk_function_parms) b = b->level_chain; pushdecl_with_scope (decl, b); + cp_finish_decl (decl, init, NULL_TREE, LOOKUP_ONLYCONVERTING); } - - cp_finish_decl (decl, init, NULL_TREE, LOOKUP_ONLYCONVERTING); + else + pushdecl_top_level_and_finish (decl, init); return decl; } -- cgit v1.1