X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fcp%2FChangeLog;h=a2651e84f77cf88b800fc81093360df287fce3ae;hb=35771a9a5c0008370e5e18d4d20b6d761513232c;hp=8b0d77465e7744f88bb9b6c623dd31f08e766323;hpb=0f4dfd04394483ac38333cedcabb1ff7aed9d4b0;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 8b0d77465e7..a2651e84f77 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,700 @@ +2002-12-28 Gabriel Dos Reis + + Remove traditional C constructs 3/n. + * cvt.c (cp_convert_to_pointer, convert_to_pointer_force, + build_up_reference, warn_ref_binding, convert_to_reference, + convert_from_reference, convert_lvalue, cp_convert, ocp_convert, + convert_to_void, convert, convert_force, build_type_conversion, + build_expr_type_conversion, type_promotes_to, + perform_qualification_conversions): Use C90 prototyping style. + * decl2.c (grok_array_decl): Use boolean constant. + (delete_sanity): Likewise. + * typeck.c (build_unary_op): Likewise. + * semantics.c (finish_switch_cond): Likewise. + * parser.c (cp_parser_direct_new_declarator): Likewise. + * init.c (build_new): Likewise. + +2002-12-27 Mark Mitchell + + * Make-lang.in (po-generated): Remove parse.c. + (CXX_OBJS): Remove parse.o and spew.o. Add parser.o. + ($(srcdir)/cp/parse.h): Remove target. + ($(srcdir)/cp/parse.c): Likewise. + (gt-cp-parse.h): Likewise. + (gt-cp-parser.h): New target. + (c++.distclean): Do not remove parse.output. + (c++.maintainer-clean): Do not remove parse.c or parse.h. + (cp/spew.o): Remove target. + (cp/lex.o): Adjust dependencies. + (cp/pt.o): Likewise. + (cp/parse.o): Likewise. + (cp/TAGS): Do not mention parse.c. + (cp/parser.o): New target. + * NEWS: Mention the new parser. + * call.c (build_scoped_method_call): Simplify. + (build_method_call): Likewise. + (build_new_function_call): Adjust calls to add_function_candidate + and add_template_candidate. + (build_new_op): Improve handling of erroroneous operands. + (convert_default_arg): Remove circular argument processing. + (name_as_c_string): New function. + (build_new_method_call): Use it. + (perform_implicit_conversion): Use error_operand_p. + * class.c (finish_struct_anon): Use constructor_name_p. + (check_field_decls): Likewise. + (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN. + (resolve_address_of_overloaded_function): Likewise. + (instantiate_type): Tweak pointer-to-member handling. + (get_primary_binfo): Remove incorrect assertion. + * config-lang.in (gtfiles): Add parser.c, remove parse.c. + * cp-tree.h (DEFARG_TOKENS): New macro. + (default_arg): New structure. + (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG. + (lang_tree_node): Add default_arg. + (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE. + (type_info_ref_type): New macro. + (saved_scope): Make processing_explicit_instantiation a boolean. + (check_access): New field. + (unparsed_text): Remove. + (language_function): Remove unparsed_inlines. + (error_operand_p): New macro. + (lang_decl): Adjust pending_inline_info. + (DEFARG_POINTER): Remove. + (tag_types): Add typenames. + (lookup_ualified_name): Declare. + (lookup_name_real): Likewise. + (shadow_tag): Adjust prototype. + (get_scope_of_declarator): Declare it. + (process_next_inline): Remove it. + (check_for_missing_semicolon): Likewise. + (maybe_get_template_decl_from_type_decl): Declare it. + (finish_label_stmt): Adjust prototype. + (finish_non_static_data_meber): Declare it. + (finish_pseudo_destructor_call_expr): Rename to ... + (finish_pseudo_destructor_expr): ... this. + (finish_compound_literal): Declare it. + (begin_inline_definitions): Remove it. + (init_spew): Remove. + (peekyylex): Likewise. + (arbitrate_lookup): Likewise. + (frob_opname): Likewise. + (maybe_snarf_defarg): Likewise. + (add_defarg_fn): Likewise. + (do_pending_defargs): Likewise. + (done_pending_defargs): Likewise. + (unprocessed_defarg_fn): Likewise. + (replace_defarg): Likewise. + (end_input): Likewise. + (get_overloaded_fn): Likewise. + * cvt.c (convert_to_reference): Improve error handling. + * decl.c (lookup_name_real): Do not declare it static. + (maybe_push_to_top_level): Set check_access. + (identifier_type_value): Adjust call to lookup_name_real. + (lookup_qualified_name): New method. + (lookup_name_real): Remove special-case parsing code. + (lookup_name-nonclass): Adjust call to lookup_name_real. + (lookup_name_namespace_only): Likewise. + (lookup_name): Likewise. + (check_tag_decl): Return the type declared. + (shadow_tag): Likewise. + (register_dtor_fn): Tweak check_access. + (grokfndecl): Use constructor_name_p. + (get_scope_of_declarator): New function. + (grokdeclarator): Obscure tweaks for slightly different declarator + representations. + (start_method): Return error_mark_node to indicate failure. + (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs. + * decl2.c (constructor_name_full): Simplify. + (constructor_name): Use it. + (build_expr_from_tree): Adjust for changes to do new parser. + (push_scope): Improve robustness. + (validate_nonmember_using_decl): Process declarations, not names. + (do_class_using_decl): Likewise. + (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS + here. + * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs. + * expr.c (cxx_expand_expr): Handle BASELINKs. + * init.c (member_init_ok_or_else): Issue more errors. + (build_offset_ref): Tweak handling of FUNCTION_DECLs. + * lex.c: Do not include parse.h. + (yypring): Do not declare. + (yylval): Likewise. + (make_reference_declarator): Remove error-generating code. + (rid_to_yy): Remove. + (cxx_init): Do not call init_spew. + (yypring): Remove. + (check_for_missing_semicolon): Remove. + * lex.h (got_scope): Remove. + (got_object): Remove. + * method.c (hack_identifier): Use finish_non_static_data_member. + (implicitly_declare_fn): Adjust use of constructor_name. + * parser.c: New file. + * pt.c (parse.h): Do not include it. + (maybe_get_template_decl_from_template): Do not declare it. + (finish_member_template_decl): Tweak. + (begin_explicit_instantiation): Adjust for + processing_explicit_instantiation being boolean. + (end_explicit_instantiation): Likewise. + (maybe_process_partial_specialization): Tighten specialization + test. + (retrieve_local_specialization): Adjust ue of hash table. + (eq_local_specializations): New function. + (register_local_specialization): Likewise. + (push_template_decl_real): Remove unnecessary test. + (maybe_get_template_decl_from_type_decl): Don't make it static. + (for_each_template_parm_r): Handle TYPEOF_TYPE. + (tsubst_copy): Use retrieive_local_specialization to handle + PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs. + Handle COMPONENT_REFs with pseudo-destructor-expressions. + Simplify handling of CALL_EXPR and METHOD_CALL_EXPR. + (tsubst_expr): Pass decls, not names, to do_local_using_decl. + (unify): Tweak handling of CONST_DECLs. + (regenerate_decl_from_template): Use push_nested_class. + (template_for_substitution): New funciton. + (instantiate_decl): Use it. Register parameters as local + specializations. + * rtti.c (init_rtti_processing): Set type_info_ref_type. + (build_typeid): Use it. + (get_typeid): Likeise. + * search.c (accessible_p): Use check_access, not + flag_access_control. + (adjust_result_of_qualified_name_lookup): Pay attention to the + context_class. + * semantics.c (finish_asm_stmt): Adjust error handling. + (finish_label_stmt): Return the statement. + (finish_non_static_data_member): New function. + (finish_class_expr): Handle BASELINKs. + (finish_call_expr): Handle PSEUDO_DTOR_EXPR. + (finish_object_call_expr): Simplify handling during templates. + (finish_pseudo_destructor_call_expr): Rename to ... + (finish_pseudo_dtor_expr): ... this. + (finish_compound_literal): New function. + (begin_inline_definitions): Remove. + (finish_sizeof): Remove special template handling. + * spew.c: Do not include parse.h. + * tree.c (get_overloaded_fn): Remove. + * typeck.c (build_class_member_access_expr): Handle + PSEUDO_DTOR_EXPR. Adjust handling of static member functions. + (lookup_destructor): New function. + (finish_class_member_access_expr): Use it. + (convert_arguments): Simplify. + (build_unary_op): Handle BASELINKs. + +2002-12-26 Nathan Sidwell + + PR c++/4803 + * decl2.c (mark_used): Defer inline functions. + (finish_file): Merge deferred_fns loops. Check all used + inline functions have a definition. + * method.c (make_thunk): Thunks are not inline. + + PR c++/5116, c++/764 + * call.c (build_new_op): Make sure template class operands are + instantiated. + +2002-12-24 Nathan Sidwell + + PR C++/7964 + * cp-tree.h (resolve_scoped_fn_name): Prototype. + * call.c (resolve_scoped_fn_name): New function. Deal with + more template expansion. Broken out of ... + * parse.y (parse_finish_call_expr): ... here. Call it. + * decl2.c (build_expr_from_tree, CALL_EXPR): Use + resolve_scoped_fn_name and build_call_from_tree. + + PR c++/9053 + * decl.c (duplicate_decls): Templates may be disambiguated by + return type. + + PR c++/8702 + * decl2.c (check_classfn): Use lookup_fnfield_1. List all + conversion operators on failure. + +2002-12-23 Gabriel Dos Reis + + Remove traditional C constructs 2/n. + * call.c (tourney, build_field_call, equal_functions, joust, + compare_ics, build_over_call, build_java_interface_fn_ref, + convert_like_real, op_error, build_object_call, resolve_args, + build_vfield_ref, check_dtor_name, build_scoped_method_call, + build_addr_func, build_call, build_method_call, null_ptr_cst_p, + sufficient_parms_p, build_conv, non_reference, strip_top_quals, + standard_conversion, reference_related_p, + reference_compatible_p, convert_class_to_reference, + direct_reference_binding, reference_binding, + ,implicit_conversion, is_complete, promoted_arithmetic_type_p, + add_template_conv_candidate, any_viable, any_strictly_viable, + build_this, splice_viable, print_z_candidates, + build_user_type_conversion, build_new_function_call, + conditional_conversion, build_conditional_expr, build_new_op, + build_op_delete_call, enforce_access, call_builtin_trap, + convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to, + convert_default_arg, type_passed_as, convert_for_arg_passing, + in_charge_arg_for_name, is_properly_derived_from, + maybe_handle_implicit_object, maybe_handle_ref_bind, + source_type, add_warning, can_convert, can_convert_arg, + perform_implicit_conversion, can_convert_arg_bad, + initialize_reference, add_conv_candidate, + add_template_candidate_real, add_template_candidate): Ansify. + +2002-12-22 Nathan Sidwell + + PR c++/8572 + * cp-tree.h (grokoptypename): Add SCOPE parameter. + * decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type + if in a template scope. + * parse.y (unoperator): Return the scope. + (operator_name): Adjust grokoptypename call. + +2002-12-22 Kriang Lerdsuwanakij + + * cp-tree.h (make_unbound_class_template): Use tsubst_flags_t. + * decl.c (make_unbound_class_template): Adjust. Check for tf_error. + * pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error. + +2002-12-20 Kazu Hirata + + * ChangeLog: Fix a typo. + * class.c: Fix comment typos. + * cp-tree.h: Likewise. + +2002-12-18 Jason Merrill + + Handle anonymous unions at the tree level. + C++ ABI change: Mangle anonymous unions using the name of their + first named field (by depth-first search). Should not cause + binary compatibility problems, though, as the compiler previously + didn't emit anything for affected unions. + * cp-tree.def (ALIAS_DECL): New tree code. + * decl2.c (build_anon_union_vars): Build ALIAS_DECLs. Return the + first field, not the largest. + (finish_anon_union): Don't mess with RTL. Do set DECL_ASSEMBLER_NAME, + push the decl, and write it out at namespace scope. + * decl.c (lookup_name_real): See through an ALIAS_DECL. + (pushdecl): Add namespace bindings for ALIAS_DECLs. + * rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name + of a decl which doesn't have one. + * typeck.c (build_class_member_access_expr): Don't recurse if + we already have the type we want. + +2002-12-18 Kriang Lerdsuwanakij + + PR c++/8099 + * friend.c (make_friend_class): Allow partial specialization + when declaration is not a template friend. + +2002-12-18 Kriang Lerdsuwanakij + + PR c++/3663 + * pt.c (lookup_template_class): Copy TREE_PRIVATE and + TREE_PROTECTED to created decl nodes. + +2002-12-18 Mark Mitchell + + * class.c (build_base_field): Do not set DECL_PACKED on the + FIELD_DECL. + +2002-12-18 Gabriel Dos Reis + + * cp-tree.h (struct tree_srcloc): Use location_t. + (SOURCE_LOCUS): New. + (SRCLOC_FILE, SRCLOC_LINE): Adjust. + +2002-12-17 Jason Merrill + + * decl.c (finish_function): Also complain about no return in + templates. + * semantics.c (finish_return_stmt): Also call check_return_expr in + templates. + * typeck.c (check_return_expr): In a template, just remember that we + saw a return. + +2002-12-16 Jason Merrill + + * semantics.c (simplify_aggr_init_exprs_r): Don't change the type + of the CALL_EXPR. + + * semantics.c (do_pushlevel): Call pushlevel after adding the + SCOPE_STMT. + (do_poplevel): Call poplevel before adding the SCOPE_STMT. + * parse.y (function_body): Go back to using compstmt. + * decl.c (pushdecl): Skip another level to get to the parms level. + + * call.c (build_new_method_call): Use is_dummy_object to determine + whether or not to evaluate the object parameter to a static member + function. + +2002-12-14 Jason Merrill + + * semantics.c (simplify_aggr_init_exprs_r): Also prepend the + return slot for normal functions. Set CALL_EXPR_HAS_RETURN_SLOT_ADDR. + * tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE, + don't bother with an AGGR_INIT_EXPR. + (cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE, + just generate a new decl normally. Take return slot parm. + * cp-tree.h: Adjust prototype. + +2002-12-13 Gabriel Dos Reis + + PR C++/8031 + * cvt.c (convert_to_pointer_force): Don't try comparing against + erronous type. + +2002-12-13 Geoffrey Keating + + * cp-tree.h: Have the multiple-include guards around + the entire file. + +2002-12-10 David Edelsohn + + * cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos + for SPEW_DEBUG. + (snarf_method): Same. + (snarf_defarg): Same. + +2002-12-10 Mark Mitchell + + PR c++/8372 + * pt.c (tsubst_copy): Handle destructor names more correctly. + +2002-12-10 Matt Austern + + * cp-tree.h: get rid of needs_virtual_reinit bit. + +2002-12-09 Mark Mitchell + + * NEWS: Document removal of in-class initialization extension for + static data members of non-arithmetic, non-enumeration type. + * decl.c (check_static_variable_definition): Do not allow that + extension. + * decl2.c (grokfield): Do not call digest_init when processing + templates. + +2002-12-05 Kaveh R. Ghazi + + * error.c (dump_expr): Fix format specifier warning. + +2002-12-04 Geoffrey Keating + + * class.c (finish_struct_1): Correct comment. + * cp-tree.c (DECL_SORTED_FIELDS): Likewise. + +2002-12-04 Gabriel Dos Reis + + PR C++/8799 + * error.c (dump_expr): Don't ever try to dump a non-existent + expression. + +2002-12-03 Nathan Sidwell + + Implement covariant returns. + * cp-tree.h (IS_AGGR_TYPE_2): Remove. + (struct lang_decl_flags): Add this_thunk_p flag. + Rename vcall_offset to virtual_offset. + (struct lang_decl): Rename delta to fixed_offset. + (DECL_THIS_THUNK_P, DECL_RESULT_THUNK_P): New #defines. + (SET_DECL_THUNK_P): Add THIS_ADJUSTING arg. + (THUNK_DELTA, THUNK_VCALL_OFFSET): Rename to ... + (THUNK_FIXED_OFFSET, THUNK_VIRTUAL_OFFSET): ... here. + (make_thunk): Add this_adjusting arg. + (finish_thunk): Declare. + (mangle_thunk): Add this_adjusting arg. + * class.c (get_vcall_index): Use base function for lookup. + (update_vtable_entry_for_fn): Generate covariant thunk. + (finish_struct_1): Set DECL_VINDEX to NULL for thunks. + (build_vtbl_initializer): Use base function for lookup. + Finish covariant thunk here. Adjust thunk generation. + * dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling. + Adjust thunk dumping. + * mangle.c (mangle_call_offset): New function. + (mangle_thunk): Adjust for covariant thunks. + * method.c (make_thunk): Adjust. Do not set name here. + (finish_thunk): New function. Set name here. + (use_thunk): Generate covariant thunks too. + (thunk_adjust): New function. + * search.c (covariant_return_p): Remove. Fold into ... + (check_final_overrider): ... here. Simplify. + * semantics.c (emit_associated_thunks): Walk covariant thunk lists. + +2002-12-03 Jason Merrill + + PR c++/8674 + * call.c (build_over_call): Check specifically for TARGET_EXPR + when eliding. + + PR c++/8461, c++/8625 + * call.c (convert_for_arg_passing): Don't mess with error_mark_node. + (cp_convert_parm_for_inlining): Remove. + * cp-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING): + Remove. + * cp-tree.h (ADDR_IS_INVISIREF): Remove. + * except.c (stabilize_throw_expr): Remove ADDR_IS_INVISIREF code. + + * call.c (build_user_type_conversion_1): Don't set ICS_BAD_FLAG on + an ambiguous conversion. + +2002-12-03 Mark Mitchell + + PR c++/8688 + * decl.c (reshape_init): Handle erroneous initializers. + +2002-12-02 Mark Mitchell + + PR c++/8720 + * spew.c (remove_last_token): Make sure that last_chunk is set + correctly. + + PR c++/8615 + * error.c (dump_expr): Handle character constants with + TREE_OVERFLOW set. + +2002-12-02 Kriang Lerdsuwanakij + + DR 180 + * decl.c (grokdeclarator): Require class-key for all friend class. + Output the correct type and context in the error message. + +2002-12-01 Mark Mitchell + + PR c++/5919 + * pt.c (unify): Use variably_modified_type_p to test validity of + template argument types. + + PR c++/8727 + * cp-tree.h (lang_type_class): Add typeinfo_var. + (CLASSTYPE_TYPEINFO_VAR): New macro. + * rtti.c (get_tinfo_decl): Use it. + + PR c++/8663 + * init.c (expand_member_init): Always get the main variant of a + base class. + +2002-12-01 Mark Mitchell + + PR c++/8332 + PR c++/8493 + * decl.c (cxx_init_decl_processing): Use size_type_node, not + c_size_type_node. + * decl2.c (coerce_new_type): Likewise. + * except.c (do_allocate_exception): Likewise. + +2002-11-30 Zack Weinberg + + * call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c, + dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c, + lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c, + repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c, + typeck2.c: Include coretypes.h and tm.h. + * Make-lang.in: Update dependencies. + +2002-11-30 Mark Mitchell + + PR c++/8227 + * decl.c (layout_var_decl): Deal gracefully with erroneous types. + (check_initializer): Validate the type of the initialized + variable, even if the initializer is absent. + * typeck.c (cp_type_quals): Deal gracefully with erroneous types. + + PR c++/8214 + * typeck.c (convert_for_assignment): Do not use + decl_constant_value on the operand. + + PR c++/8511 + * pt.c (instantiate_decl): Handle template friends defined outside + of the class correctly. + +2002-11-29 Joe Buck + + * parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for + anonymous structs. + +2002-11-29 Mark Mitchell + + * class.c (walk_subobject_offsets): Recur on binfos as well as on + types. + (layout_nonempty_base_or_field): Pass it a binfo when processing a + base class. + (layout_empty_base): Likewise. + (build_base_field): Likewise. + +2002-11-27 Mark Mitchell + + * class.c (build_base_field): Make sure we get the canonical base + when descending through primary bases. + +2002-11-26 Geoffrey Keating + + * decl.c (check_initializer): Don't error on initialisation of + a scalar with a brace-enclosed expression. + +2002-11-26 Nathan Sidwell + + * cp-tree.h (DECL_LANG_FLAG_4): Document more uses. + (template_parms_equal): Remove prototype. + * typeck.c (buuld_indirect_ref): Reformat. + +2002-11-25 Jason Merrill + + * init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT + and a DO_STMT. + +2002-11-25 Mark Mitchell + + * tree.c (cp_build_qualified_type_real): Correct handling of + array types. + * class.c (walk_subobject_offsets): Fix thinko. + (build_base_field): Record offsets of empty bases in primary + virtual bases. + (layout_class_type): Record offsets of empty bases in fields. + + * search.c (is_subobject_of_p_1): Fix thinko. + (lookup_field_queue_p): Likewise. + +2002-11-24 Mark Mitchell + + * class.c (layout_class_type): Reuse tail padding when laying out + virtual bases. + +2002-11-22 Mark Mitchell + + * rtti.c (qualifier_flags): Fix thinko. + +2002-11-21 Gabriel Dos Reis + + Remove traditional C constructs 1/n. + * cp-tree.h (init_method, set_mangled_name_for_decl, + build_opfncall, hack_identifier, make_thunk, use_thunk, + synthesize_method, implicitly_declare_fn, + skip_artificial_parms_for, optimize_function, calls_setjmp_p, + maybe_clone_body): Remove use of PARAMS. + + * method.c (do_build_assign_ref, do_build_copy_constructor, + synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy): + Likewise. + (synthesize_method): Use 'bool' type and constants instead of + 'int'. + (locate_copy): Likewise. + (implicitly_declare_fn): Likewise. + + * optimize.c (calls_setjmp_r, update_cloned_parm, dump_function): + Remove old-style declaration. + (maybe_clone_body): Use 'bool' type and constants. + +2002-11-21 Glen Nakamura + + PR c++/8342 + * typeck.c (get_member_function_from_ptrfunc): Make sure that a + SAVE_EXPR for instance_ptr doesn't get evaluated first inside one + of the branches of a COND_EXPR. + +2002-11-19 Mark Mitchell + + * pt.c (for_each_template_parm): Free allocated memory. + * search.c (is_subobject_of_p_1): New function. + (is_subobject_of_p): Avoid walking virtual bases multiple times. + +2002-11-19 Jason Thorpe + + * g++spec.c (lang_specific_spec_functions): New. + +2002-11-15 Kazu Hirata + + * ChangeLog: Follow spelling conventions. + * class.c: Likewise. + * decl2.c: Likewise. + +2002-11-14 Zack Weinberg + + * search.c (dfs_push_decls): Do not try to reorder elements + 3..n of method_vec if method_vec has only two elements. + Reverse order of two tests to avoid accessing unallocated + memory. + +2002-11-14 Mark Mitchell + + * class.c (dfs_find_final_overrider): Adjust so that the most + derived object is a binfo, rather than a class type. + (find_final_overrider): Likewise. + (add_vcall_offset_vtbl_entries_1): Simplify accordingly. + (add_vcall_offset): Likewise. + +2002-11-09 Kriang Lerdsuwanakij + + PR c++/8389 + * pt.c (instantiate_template): Push class scope for member + functions. + (get_mostly_instantiated_function_type): Likewise. Don't call + tsubst on context. Remove CONTEXTP and TPARMSP parameters. + * cp-tree.h (get_mostly_instantiated_function_type): Adjust. + * mangle.c (write_encoding, write_unqualified_name): Adjust. + +2002-11-07 Mark Mitchell + + * class.c (add_vcall_offset_vtbl_entries_1): Correct ordering of + vcall offfsets. Split out ... + (add_vcall_offset): ... new function. + + PR c++/8338 + * pt.c (for_each_template_parm): Add htab parameter. + (process_partial_specialization): Adjust call. + (push_template_decl_real): Likewise. + (pair_fn_data): Add visited. + (for_each_template_parm_r): Avoid walking duplicates more than + once. + (uses_template_parms): Adjust call to for_each_template_parm. + +2002-11-07 Mark Mitchell + + * class.c (add_implicitly_declared_members): Put implicitly + declared functions at the end of TYPE_METHODs when -fabi-version + is at least 2. + +2002-11-05 Geoffrey Keating + + * decl2.c (finish_file): Correct spelling. + +2002-11-03 Mark Mitchell + + * call.c (build_special_member_call): Do not try to lookup VTTs by + name. + * class.c (vtbl_init_data): Add generate_vcall_entries. + (get_vtable_decl): Do not look up virtual tables by name. + (copy_virtuals): Do not use BV_USE_VCALL_INDEX_P. + (set_primary_base): Do not set CLASSTYPE_RTTI. + (determine_primary_base): Likewise. + (get_matching_virtual): Remove. + (get_vcall_index): New function. + (update_vtable_entry_for_fn): Do not try to use virtual thunks + when they are not required. Assign vcall indices at this point. + (finish_struct_1): Do not set CLASSTYPE_NEEDS_VIRTUAL_REINIT. + Do update dynamic_classes. + (build_vtt): Do not add VTTs to the symbol table. + (build_ctor_vtbl_group): Likewise. + (build_vtbl_initializer): Simplify handling of vcall indices. + (build_vcall_offset_vtbl_entries): Pretend to build vcall offsets + for the most derived class. + (add_vcall_offset_vtbl_entries_1): But do not actually add them to + the vtable. + * cp-tree.h (dynamic_classes): New macro. + (lang_type_class): Remove rtti. Add vtables. Add vcall_indices. + (CLASSTYPE_RTTI): Remove. + (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Remove. + (CLASSTYPE_VCALL_INDICES): New macro. + (CLASSTYPE_VTABLES): Likewise. + (BV_USE_VCALL_INDEX_P): Remove. + (build_vtable_path): Remove. + * decl2.c (finish_vtable_vardecl): Remove. + (key_method): Remove #if 0'd code. + (finish_vtable_vardecl): Rename to ... + (maybe_emit_vtables): ... this. + (finish_file): Use it. + * search.c (look_for_overrides_here): Update comment. + +2002-11-01 Zack Weinberg + + PR c/7353 redux + * decl2.c (grokfield): Reject TYPE_DECLs with initializers. + 2002-10-30 Jason Merrill PR c++/8186 @@ -21,7 +718,7 @@ PR c++/8149 * decl.c (make_typename_type): Issue errors about invalid results. - + 2002-10-30 Kriang Lerdsuwanakij Core issue 287, PR c++/7639 @@ -77,7 +774,7 @@ * pt.c (build_template_decl): Don't set it. (tsubst_decl): Likewise. * typeck.c (expand_ptrmemfunc_cst): Don't use it. - + * class.c (build_vtbl_initializer): Don't use build_vtable_entry. (build_vtable_entry): Remove. * cp-tree.h (BINFO_VIRTUALS): Expand documentation. @@ -145,7 +842,7 @@ (layout_nonempty_base_or_field): Do not check for conflicts when laying out a virtual base using the GCC 3.2 ABI. (build_base_field): Correct checking for presence of empty classes - at non-zero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P. + at nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P. * class.c (include_empty_classes): Use normalize_rli. (layout_class_type): Likewise. @@ -742,6 +1439,14 @@ * decl.c (start_cleanup_fn): Clear interface_only before start_function, restore it afterwards. +2002-09-02 Nathan Sidwell + + * cp-tree.h (finish_builtin_type): Remove. + * decl2.c (finish_builtin_type): Move to common code. + * decl.c (build_ptrmemfunc_type): Adjust. + * rtti.c (create_pseudo_type_info): Adjust. + (create_tinfo_types): Adjust. + 2002-08-31 Jason Merrill * cp-lang.c (cp_expr_size): Allow initialization from a @@ -4364,7 +5069,7 @@ Tue Oct 23 14:00:20 2001 Richard Kenner * parse.y (asm_operand): Allow named operands. * semantics.c (finish_asm_stmt): Tweek for changed location - of the operand constrant. + of the operand constraint. 2001-10-09 Jason Merrill @@ -7475,7 +8180,7 @@ Sun Feb 4 15:52:44 2001 Richard Kenner (cp_make_fname_decl): Use size_int, not build_int_2. (push_inline_template_parms_recursive): Likewise. (end_template_parm_list): Likewise. - (for_each_tempalte_parm): Do not use walk_tree_without_duplicates. + (for_each_template_parm): Do not use walk_tree_without_duplicates. (tsubst_template_parms): Use size_int, not build_int_2. (tsubst): Likewise. * rtti.c (get_vmi_pseudo_type_info): Likewise.