From f44b0c8ec5fdc1fc12508a40cd6d4da209279ab6 Mon Sep 17 00:00:00 2001 From: Mark Mitchell Date: Sun, 11 Jul 2004 21:02:31 +0000 Subject: cp-tree.h (saved_scope): Make old_bindings a vector. * cp-tree.h (saved_scope): Make old_bindings a vector. (unuse_fields): Remove. * name-lookup.h (cxx_saved_binding): Define it. * class.c (pushclass): Don't use unuse_fields. * name-lookup.c (cxx_saved_binding_make): Remove. (store_binding): Add new bindings to a vector, using an accumulator style, rather than adding them to a list. (store_bindings): Adjust accordingly. (store_class_bindings): Likewise. (push_to_top_level): Likewise. (pop_from_top_level): Likewise. * optimize.c (maybe_clone_body): Must push_to_top_level and pop_from_top_level calls outside of loop. * parser.c (cp_parser_class_specifier): Move push_scope/pop_scope calls here from cp_parser_late_parsing_default_args. (cp_parser_save_default_args): Record the class type in which the function is declared. (cp_parser_late_parsing_default_args): Do not call push_nested_class/pop_nested_class. * search.c (dfs_unuse_fields): Remove. (unuse_fields): Remove. * g++.dg/parse/defarg8.C: New test. From-SVN: r84530 --- gcc/cp/optimize.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gcc/cp/optimize.c') diff --git a/gcc/cp/optimize.c b/gcc/cp/optimize.c index 448a0b3..8a3ebe6 100644 --- a/gcc/cp/optimize.c +++ b/gcc/cp/optimize.c @@ -88,6 +88,7 @@ maybe_clone_body (tree fn) /* We know that any clones immediately follow FN in the TYPE_METHODS list. */ + push_to_top_level (); for (clone = TREE_CHAIN (fn); clone && DECL_CLONED_FUNCTION_P (clone); clone = TREE_CHAIN (clone)) @@ -131,7 +132,6 @@ maybe_clone_body (tree fn) update_cloned_parm (parm, clone_parm); /* Start processing the function. */ - push_to_top_level (); start_preparsed_function (clone, NULL_TREE, SF_PRE_PARSED); /* Remap the parameters. */ @@ -198,8 +198,8 @@ maybe_clone_body (tree fn) finish_function (0); BLOCK_ABSTRACT_ORIGIN (DECL_INITIAL (clone)) = DECL_INITIAL (fn); expand_or_defer_fn (clone); - pop_from_top_level (); } + pop_from_top_level (); /* We don't need to process the original function any further. */ return 1; -- cgit v1.1