diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2004-07-12 16:06:40 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-07-12 16:06:40 +0000 |
commit | cad7e87b1191e2b96f22ca5b12cddc528e364340 (patch) | |
tree | bb13256ed44abc12331324fbb0e1e57406cd13df /gcc/cp/parser.c | |
parent | 255cd731f40dd7b5855e0bc12a9cdd6383e65321 (diff) | |
download | gcc-cad7e87b1191e2b96f22ca5b12cddc528e364340.zip gcc-cad7e87b1191e2b96f22ca5b12cddc528e364340.tar.gz gcc-cad7e87b1191e2b96f22ca5b12cddc528e364340.tar.bz2 |
call.c (build_user_type_conversion_1, [...]): Pass type directly to lookup_fnfields & build_special_member_call.
* call.c (build_user_type_conversion_1, build_new_op,
check_constructor_callable, build_temp,
perform_direct_initialization_of_possible): Pass type directly to
lookup_fnfields & build_special_member_call.
(build_special_member_call): Accept a type, and complete it.
* class.c (finish_stuct_bits): Copy the BINFOs here.
* cvt.c (ocp_convert): Pass type directly to
build_special_member_call.
* decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
(xref_basetypes): Allocate the binfo here. Adjust.
* init.c (build_init, build_new_1): Pass type directly to
build_special_member_call.
* lex.c (cxx_make_type): Do not allocate binfo here.
* name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
* parser.c (cp_parser_class_head): Always call xref_basetypes.
* pt.c (instantiate_class_template): Likewise. Inhibit access
checking for template friends.
* ptree.c (cxx_print_type): Adjust record printing.
* search.c (lookup_base): When taking a type, complete it before
looking for a binfo.
(lookup_member): Delay completing a type.
(push_class_decls): Don't walk an incomplete type.
(lookup_conversions): Likewise.
* semantics.c (finish_stmt_expr_expr): Pass type directly to
build_special_member_call.
* tree.c (copy_base_binfos): Adjust.
(make_binfo): Likewise.
* typeck.c (build_modify_expr): Pass type directly to
build_special_member_call.
* typeck2.c (process_init_constructor): Check a binfo exists.
(build_m_component_ref): Allow accessing an incomplete type.
(build_functional_cast): Pass type directly to
build_special_member_call.
From-SVN: r84562
Diffstat (limited to 'gcc/cp/parser.c')
-rw-r--r-- | gcc/cp/parser.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index a7fe73d..08ee875 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -12494,6 +12494,7 @@ cp_parser_class_head (cp_parser* parser, bool invalid_explicit_specialization_p = false; bool pop_p = false; unsigned num_templates; + tree bases; /* Assume no nested-name-specifier will be present. */ *nested_name_specifier_p = false; @@ -12770,17 +12771,16 @@ cp_parser_class_head (cp_parser* parser, is valid. */ if (nested_name_specifier) pop_p = push_scope (nested_name_specifier); - /* Now, look for the base-clause. */ - token = cp_lexer_peek_token (parser->lexer); - if (token->type == CPP_COLON) - { - tree bases; + + bases = NULL_TREE; + + /* Get the list of base-classes, if there is one. */ + if (cp_lexer_next_token_is (parser->lexer, CPP_COLON)) + bases = cp_parser_base_clause (parser); + + /* Process the base classes. */ + xref_basetypes (type, bases); - /* Get the list of base-classes. */ - bases = cp_parser_base_clause (parser); - /* Process them. */ - xref_basetypes (type, bases); - } /* Leave the scope given by the nested-name-specifier. We will enter the class scope itself while processing the members. */ if (pop_p) |