cp-tree.h (saved_scope): Make old_bindings a vector.
authorMark Mitchell <mark@codesourcery.com>
Sun, 11 Jul 2004 21:02:31 +0000 (21:02 +0000)
committerMark Mitchell <mmitchel@gcc.gnu.org>
Sun, 11 Jul 2004 21:02:31 +0000 (21:02 +0000)
commitf44b0c8ec5fdc1fc12508a40cd6d4da209279ab6
treeb47ca1ae95a6c5cdd74d9e1827122aa0590299ed
parent4dcf7d66acad759f4c62caaa39d8b981ced74892
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/ChangeLog
gcc/cp/class.c
gcc/cp/cp-tree.h
gcc/cp/name-lookup.c
gcc/cp/name-lookup.h
gcc/cp/optimize.c
gcc/cp/parser.c
gcc/cp/search.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/parse/defarg8.C [new file with mode: 0644]