ChangeLog   [plain text]

2003-04-02  Geoffrey Keating  <>

	* mangle.c: Include gt-cp-mangle.h.
	(subst_identifiers): Mark with GTY.
	* (gtfiles): Add cp/mangle.c.
	* (gt-cp-mangle.h): New rule.
	(cp/mangle.o): Depends on gt-cp-mangle.h.

2003-03-04  Gabriel Dos Reis <>

	* cp-tree.h (cxx_saved_binding): Declare.
	(struct saved_scope): Adjust type of field 'old_binding'.
	* decl.c (cxx_saved_binding_make): New macro.
	(struct cxx_saved_binding): Define.
	(store_bindings): Adjust prototype.  Use cxx_saved_binding to save
	C++ bindings. 
	(maybe_push_to_top_level): Adjust local variable type.
	(pop_from_top_level): Likewise.

2003-03-03  Jason Merrill  <>

	* decl.c (finish_enum): Do set the type in a template. Simplify.
	* pt.c (tsubst_enum, tsubst_copy): Revert last patch.

2003-03-03  Mark Mitchell  <>

	PR c++/9878
	* call.c (convert_class_to_reference): Correct conversion
	(reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
	(implicit_conversion): Adjust call to reference_binding.
	(add_candidate): Change type of candidates parameter.
	(add_function_candidate): Likewise.
	(add_conv_candidate): Likewise.
	(build_builtin_candidate): Likewise.
	(add_builtin_candidate): Likewise.
	(add_builtin_candidates): Likewise.
	(add_template_candidate_real): Likewise.
	(add_template_candidate): Likewise.
	(add_template_conv_candidate): Likewise.
	(build_user_type_conversion_1): Adjust accordingly.
	(build_object_call): Likewise.
	(build_conditional_expr): Likewise.
	(add_candidates): Likewise.
	(build_new_op): Likewise.
	(convert_like_real): Use USER_CONV_CAND.  Use build_nop.
	(build_new_method_call): Adjust calls to add_function_candidate.
	(make_temporary_var_for_ref_to_temp): New function.
	(initialize_reference): Add decl parameter.
	* class.c (build_rtti_vtbl_entries): Use build_address and
	* cp-tree.h (initialize_reference): Change prototype.
	(make_temporary_var_for_ref_to_temp): New function.
	(build_type_conversion): Change prototype.
	(build_address): New function.
	(build_nop): Likewise.
	* cvt.c (cp_convert_to_pointer): Adjust call to
	build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
	Use build_nop.
	(convert_to_pointer_force): Use build_nop.
	(build_up_reference): Use make_temporary_var_for_ref_to_temp.
	(convert_to_reference): Adjust call to build_type_conversion.
	(ocp_convert): Likewise.
	(build_type_conversion): Remove for_sure parameter.
	* decl.c (grok_reference_init): Use initialize_reference.
	* typeck.c (build_address): New function.
	(build_nop): Likewise.
	(build_unary_op): Use them.
	(build_ptrmemfunc): Tidy slightly.
	(convert_for_initialization): Adjust call to
	* typeck2.c (store_init_value): Remove #if 0'd code.

2003-03-02  Ashif Harji  <>

	* lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
	  invoke an external cpp during compilation.

2003-02-28 Mark Mitchell  <>

	PR c++/9892
	* pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
	instantiating it.

2003-02-28  Mark Mitchell  <>

	PR c++/9879
	* cp-tree.h (build_zero_init): Add parameter.
	* decl.c (cp_finish_decl): Adjust call.
	* init.c (build_zero_init): Add nelts parameter.  Adjust recursive
	(build_default_init): Add nelts parameter.  Adjust calls to
	(build_new_1): Adjust call to build_default_init.
	* typeck2.c (process_init_constructor): Adjust call to build_zero_init.

2003-02-27  Devang Patel  <>

        * decl.c (finish_enum): Merge two 'for' loops. Copy value node if required.
	Postpone enum setting for template decls.
	(build_enumerator): Delay copying value node until finish_enum (). Remove
	#if 0'ed code.
	* pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
	(tsubst_copy): Add check for enum type.

2003-02-25  Mark Mitchell  <>

	PR c++/9829
	* decl.c (grokdeclarator): Handle SCOPE_REFs whose second argument

2003-02-24 Gabriel Dos Reis  <>

	* decl.c (add_binding): Time TV_NAME_LOOKUP.
	(push_class_binding): Likewise.
	(set_namespace_binding): Likewise.

2003-02-24  Kriang Lerdsuwanakij  <>

	PR c++/9602
	* typeck2.c (abstract_virtuals_error): Don't check when we
	are processing a template.

2003-02-23  Kriang Lerdsuwanakij  <>

	PR c++/7982
	* decl.c (warn_about_implicit_typename_lookup): Handle TYPEOF_TYPE.

2003-02-21  Mark Mitchell  <>

	PR c++/9749
	* decl.c (grokdeclarator): Do not allow parameters with variably
	modified types.

	PR c++/9727
	* decl2.c (push_scope): Don't pushclass for non-class types.
	(pop_scope): Don't popclass either.

	PR c++/8906
	* decl.c (lookup_name_real): Use IMPLICIT_TYPENAME_P.
	* decl2.c (handle_class_head): Check it.

	PR c++/8724
	* call.c (build_method_call): Make sure that the type destroyed in
	an explicit destructor call is complete.

2003-02-20  Mark Mitchell  <>

	PR c++/9729
	* mangle.c (mangle_conv_op_name_for_type): Issue an error message
	when the G++ 3.2 ABI prevents correct compilation.

2003-02-18  Mark Mitchell  <>

	PR c++/9704
	* class.c (layout_class_type): In the 3.2 ABI, take into account
	trailing bit fields when computing CLASSTYPE_SIZE_UNIT.

2003-02-18  Matt Austern <>
	* cp/cp-lang.c: Change lang hooks so that final_write_globals does
	nothing for C++.
	* cp/decl.c (wrapup_globals_for_namespace): Remove special
	handling of global namespace.
2003-02-18  Jason Merrill  <>

	PR c++/9623
	* decl.c (reshape_init): Don't mess with initializer labels.

2003-02-18  Kriang Lerdsuwanakij  <>

	PR c++/9459
	* error.c (dump_type_prefix): Handle TYPEOF_TYPE.
	(dump_type_suffix): Likewise.

2003-02-17  Michael Elizabeth Chastain <>

	PR debug/9717
	* class.c (build_base_field): Mark fields for base classes with

2003-02-13  Andrew Pinski <>

        * decl.c: (define_label): Fix warning for return 0 instead of NULL.
2003-02-13  Gabriel Dos Reis <>

	* (cp/decl2.o): Add dependency on timevar.h
	* decl2.c: Include "timevar.h".
	(namespace_ancestor): Time name lookup.
	(add_using_namespace): Likewise.
	(lookup_using_namespace): Likewise.
	(qualified_lookup_using_namespace): Likewise.
	(decl_namespace): Likewise.
	(lookup_arg_dependent): Likewise.
	* lex.c (do_identifier): Likewise.
	(do_scoped_id): Likewise.
	* pt.c (lookup_template_class): Likewise.

2003-02-12  Gabriel Dos Reis <>

	* decl.c (define_label): Don't forget to pop TV_NAME_LOOKUP.

2003-02-11  Gabriel Dos Reis  <>

	* decl.c: Include "timevar.h".
	(poplevel): Time name lookup.
	(find_binding): Likewise.
	(push_namespace): Likewise.
	(pop_nested_namespace): Likewise.
	(store_bindings): Likewise.
	(maybe_push_to_top_level): Likewise.
	(pop_from_top_level): Likewise.
	(push_local_name): Likewise.
	(pushtag): Likewise.
	(pushdecl): Likewise.
	(pushdecl_with_scope): Likewise.
	(pushdecl_namespace_level): Likewise.
	(pushdecl_top_level): Likewise.
	(pushdecl_class_level): Likewise.
	(push_class_level_binding): Likewise.
	(push_using_decl): Likewise.
	(push_using_directive): Likewise.
	(push_overloaded_decl): Likewise.
	(lookup_label): Likewise.
	(define_label): Likewise.
	(lookup_tag): Likewise.
	(lookup_tag_reverse): Likewise.
	(lookup_namespace_name): Likewise.
	(select_decl): Likewise.
	(unqualified_namespace_lookup): Likewise.
	(lookup_name_real): Likewise.
	(lookup_name_current_level): Likewise.
	(lookup_type_current_level): Likewise.
	(maybe_inject_for_scope_var): Likewise.
	(xref_tag): Likewise.

	* (cp/decl.o): Add dependency on timevar.h

2003-02-03  Mark Mitchell  <>

	PR c++/7129
	* operators.def: Add <?= and >?=.

2003-01-31  Kriang Lerdsuwanakij  <>

	PR c++/8849
	* error.c (dump_expr): Handle BASELINK.
	* pt.c (resolve_overloaded_unification): Handle FUNCTION_DECL.

2003-01-31  Kriang Lerdsuwanakij  <>

	PR c++/9453
	* friend.c (is_friend): Always accept when SUPPLICANT is still
	* pt.c (push_access_scope_real): Call push_to_top_level for
	function in namespace scope.
	(push_access_scope): Remove ARGS argument, all caller adjusted.
	(pop_access_scope): Call pop_from_top_level for function in
	namespace scope.
	(regenerate_decl_from_template): Use push_access_scope_real.
2003-01-29  Nathan Sidwell  <>

	PR c++/9437
	* pt.c (unify): Don't unify '*T' with 'U C::*'.

2003-01-27  Jeffrey D. Oldham  <>

	PR c++/47
	* cp-tree.h (lookup_nested_field): Add declaration.
	* decl.c (lookup_name_real): Call lookup_nested_field.
	* search.c (lookup_nested_field): Add function.

2003-01-26  Christian Cornelssen  <>

	* (c++.install-common, c++.install-man)
	(c++.uninstall): Prepend $(DESTDIR) to destination paths in
	all (un)installation commands.
	(c++.install-common): Rewrite $(LN) commands to support
	DESTDIR with "ln" as well as with "ln -s".

2003-01-24  Kaveh R. Ghazi  <>

	* decl2.c (check_classfn): Fix uninitialized warning.

2003-01-22  Mark Mitchell  <>

	PR c++/9328
	* error.c (dump_decl): For an OVERLOAD, just print the name of the
	function; it doesn't make sense to try to print its type.
	* semantics.c (finish_typeof): Issue errors about invalid uses.

2003-01-22  Josef Zlomek  <>

	PR/9386, PR/8801
	2002-12-27  Mark Mitchell  <>
	* typeck.c (build_class_member_access_expr): Fix anonymous union

2003-01-17  Jason Merrill  <>

	PR c++/9167, c++/9358
	* decl.c (require_complete_types_for_parms): Also update DECL_ARG_TYPE.

2003-01-17  Jason Merrill  <>

	PR c++/9342
	* call.c (build_conditional_expr): Always do lvalue-rvalue

2003-01-16  Jason Merrill  <>

	PR c++/8564
	* init.c (build_vec_init): Re-add maxindex parm.
	(perform_member_init, build_aggr_init): Pass it.
	(build_new_1): Pass it. Use an incomplete array type for full_type.
	* typeck.c (build_modify_expr): Pass it.
	* cp-tree.h: Adjust.

2003-01-13  Jason Merrill  <>

	PR c++/8748
	* class.c (build_base_path): Take the address before calling save_expr.

	* call.c (build_user_type_conversion_1): Do set ICS_BAD_FLAG if
	all the ambiguous conversions are bad.

	* class.c (maybe_warn_about_overly_private_class): Don't stop
	searching when we find a nonprivate method.

2003-01-09  Jakub Jelinek  <>

	* decl.c (start_decl): Only check DECL_THREAD_LOCAL for VAR_DECLs.

2003-01-09  Jakub Jelinek  <>

	* decl.c (start_decl): Don't set DECL_COMMON for __thread variables.

2003-01-07  Kriang Lerdsuwanakij  <>

	PR c++/9030
	* decl.c (make_typename_type): Check access only when tf_error.
	(make_unbound_class_template): Likewise.
	* pt.c (saved_access_scope): New variable.
	(push_access_scope_real): New function.
	(push_access_scope): Likewise.
	(pop_access_scope): Likewise.
	(tsubst_default_argument): Use them.
	(instantiate_template): Likewise.
	(regenerate_decl_from_template): Likewise.
	(instantiate_decl): Likewise.
	(get_mostly_instantiated_function_type): Likewise.

2003-01-06  Mark Mitchell  <>

	PR c++/9165
	* decl2.c (build_cleanup): Mark the object as used.

2003-01-03  Nathan Sidwell  <>

	PR c++/45, c++/3784
	* tree.c (cp_tree_equal, TEMPLATE_PARM_INDEX): The types must be
	the same too.

2002-12-30  Nathan Sidwell  <>

	PR c++/9054
	* class.c (layout_class_type): Set DECL_CONTEXT of type for base.
	* dump.c (cp_dump_tree, RECORD_TYPE): Deal with type for base types.

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

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-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-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

2002-12-18  Kriang Lerdsuwanakij  <>

	* parse.y (bad_parm): Add missing argument to error function call.

2002-12-18  Kriang Lerdsuwanakij  <>

	PR c++/8442
	* decl2.c (handle_class_head): Verify if the looked up name is a
	type or template.
	* pt.c (convert_template_argument): Fix type or template template
	parameter decision logic.

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  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
	* decl2.c (grokfield): Do not call digest_init when processing

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

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-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

	PR c++/8615
	* error.c (dump_expr): Handle character constants with
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.
	* 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
	* decl2.c (coerce_new_type): Likewise.
	* except.c (do_allocate_exception): Likewise.

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
	(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  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  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

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
	(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
	(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
	* 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.
	(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
	* cp-tree.h (ADDR_IS_INVISIREF): New macro.
	* call.c (convert_for_arg_passing): Set it.
	* except.c (stabilize_throw_expr): Recurse for such an arg.

2002-10-31  Mark Mitchell  <>

	* cp-tree.h (lang_decl_flags): Remove init_priority.
	(lang_decl): Add delta.
	(THUNK_DELTA): Revise definition.
	* decl2.c (start_objects): Don't set GLOBAL_INIT_PRIORITY.
	* dump.c (cp_dump_tree): Don't dump it.

2002-10-30  Mark Mitchell  <>

	PR c++/8160
	* typeck2.c (process_init_constructor): Call complete_array_type.

	PR c++/8149
	* decl.c (make_typename_type): Issue errors about invalid results.

2002-10-30  Kriang Lerdsuwanakij  <>

	Core issue 287, PR c++/7639
	* cp-tree.h (lang_type_class): Add decl_list field.
	(maybe_add_class_template_decl_list): Add declaration.
	* class.c (duplicate_tag_error): Initialize CLASSTYPE_DECL_LIST.
	(unreverse_member_declarations): Reverse CLASSTYPE_DECL_LIST.
	(maybe_add_class_template_decl_list): New function.
	(add_implicitly_declared_members): Use it.
	* decl.c (maybe_process_template_type_declaration): Likewise.
	(pushtag): Likewise.
	* friend.c (add_friend): Likewise.
	(make_friend_class): Likewise.
	* semantics.c (finish_member_declaration): Likewise.
	(begin_class_definition): Initialize CLASSTYPE_DECL_LIST.
	* pt.c (instantiate_class_template): Use CLASSTYPE_DECL_LIST
	to process members and friends in the order of declaration.

2002-10-29  Mark Mitchell  <>

	PR c++/8287
	* decl.c (finish_destructor_body): Create the label to jump to
	when returning from a destructor here.
	(finish_function_body): Rather than here.

2002-10-25  Zack Weinberg  <>

	PR c++/7266
	* decl.c (grokdeclarator): Check that TREE_OPERAND 0 of a
	SCOPE_REF is not null before dereferencing it.

2002-10-25  Mark Mitchell  <>

	* call.c (build_over_call): Use DECL_CONTEXT, not
	* class.c (modify_vtable_entry): Don't mess with
	(set_vindex): Remove.
	(set_primary_base): Remove vfuns_p parameter.
	(determine_primary_base): Likewise.
	(modify_all_vtables): Likewise.
	(layout_class_type): Likewise.  Adjust calls to other functions
	(finish_struct_1): Adjust calls to modified functions.  Set
	* cp-tree.h (lang_type_class): Remove vsize.
	(lang_decl): Remove thunks.
	(DECL_THUNKS): Adjust.
	(duplicate_decls): Don't copy it.
	* 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.
	(lang_decl): Add thunks.
	(DECL_THUNKS): New macro.
	* decl.c (duplicate_decls): Copy it.
	* method.c (make_thunk): Simplify, and add thunks to DECL_THUNKS.
	* semantics.c (emit_associated_thunks): Simplify.

2002-10-24  David Edelsohn  <>

	PR c++/7228
	lang_type structure exists before accessing field.
	* class.c (check_field_decls): Use new macros.
	* typeck2.c (process_init_constructor): Remove redundant check for
	existence of lang_type structure.

2002-10-24  Mark Mitchell  <>

	* class.c (end_of_base): New method.
	(end_of_class): Use it.  Check indirect virtual bases.

	* class.c (check_field_decls): Fix typo.

2002-10-23  Mark Mitchell  <>

	PR c++/8067
	* decl.c (maybe_inject_for_scope_var): Ignore __FUNCTION__ and
	related variables.

	PR c++/7679
	* spew.c (next_token): Do not return an endless stream of
	(snarf_method): Add three END_OF_SAVED_INPUT tokens to the end of
	the cached token stream.
	(snarf_defarg): Likewise.

2002-10-23  Zack Weinberg  <>

	* cp-lang.c (cp_var_mod_type_p): New: C++ hook for
	* cp-tree.h: Remove prototype of variably_modified_type_p.
	* tree.c (variably_modified_type_p): Remove; now implemented
	in language-independent code.

2002-10-22  Mark Mitchell  <>

	PR c++/6579
	* spew.c (snarf_parenthesized_expression): New function.
	(snarf_block): Use it.

2002-10-22  Richard Henderson  <>

	* method.c (use_thunk): Always compute vcall_value; assert that
	it is not zero.  Use can_output_mi_thunk; use output_mi_thunk
	for vcall thunks as well.

2002-10-21  Mark Mitchell  <>

	* class.c (empty_base_at_nonzero_offset_p): New function.
	(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 nonzero offsets when clearing CLASSTYPE_NEARLY_EMPTY_P.

	* class.c (include_empty_classes): Use normalize_rli.
	(layout_class_type): Likewise.

	* decl.c (reshape_init): Tweak handling of character arrays.

	PR c++/8218
	* cp-tree.h (lang_type_class): Add contains_empty_class_p.
	* class.c (check_bases): Update CLASSTYPE_CONTAINS_EMPTY_CLASS_P.
	(check_field_decls): Likewise.
	(layout_class_type): Likewise.
	(finish_struct_1): Initialize it.
	(walk_subobject_offsets): Use it to prune searches.

2002-10-20  Mark Mitchell  <>

	* method.c (use_thunk): Compute the vcall index as a HOST_WIDE_INT.
	* optimize.c (optimize_function): Replace ASM_OUTPUT_MI_THUNK with

2002-10-18  Zack Weinberg  <>

	* decl.c (start_decl): Point users of the old initialized-
	typedef extension at __typeof__.

2002-10-18  Mark Mitchell  <>

	* (method.o): Depend on TARGET_H.
	* method.c (target.h): Include it.
	(use_thunk): Use target hooks.  Use vcall thunks, if available.

2002-10-18  Mark Mitchell  <>

	* class.c (base_derived_from): Make sure return value is a bool.

2002-10-18  Mark Mitchell  <>

	* class.c (find_final_overrider_data_s): Remove overriding_fn and
	(dfs_base_derived_from): New function.
	(base_derived_from): Likewise.
	(dfs_find_final_overrider): Use base_derived_from.
	(find_final_overrider): Adjust.

2002-10-18  Jason Merrill  <>

	PR c++/8080
	* semantics.c (finish_for_cond, finish_while_cond): Don't mess
	with condition decls in a template.

2002-10-17  Nathan Sidwell  <>

	* class.c (add_method): Compare template parms too.

2002-10-17  Mark Mitchell  <>

	PR c++/7584
	* class.c (handle_using_decl): Allow the declaration used to be
	from an ambiguous base.

	* pt.c (convert_template_argument): Revert this change:
		2002-10-16  Mark Mitchell  <>
		* pt.c (convert_template_argument): Do not fold non-type
		template rguments when inside a template.

	* init.c (expand_default_init): Handle brace-enclosed initializers

2002-10-16  Mark Mitchell  <>

	* mangle.c (write_expression): Correct handling of enumeration
	(write_template_arg): Likewise.
	* pt.c (convert_template_argument): Do not fold non-type template
	arguments when inside a template.

	PR c++/7478
	* cvt.c (convert_to_reference): Allow references as the incoming

2002-10-16  Mark Mitchell  <>

	PR c++/7524
	* method.c (do_build_assign_ref): Use cp_build_qualified_type, not

2002-10-15  Richard Henderson  <>

	* error.c (dump_expr): Use real_to_decimal directly, and with
	the new arguments.

2002-10-15  Mark Mitchell  <>

	* decl.c (reshape_init): Fix typo.

	* cp-tree.h (operator_name_info_t): Add arity.
	* lex.c (init_operators): Initialize it.
	* mangle.c (write_conversion_operator_name): New function.
	(write_unqualified_name): Use it.
	(write_template_args): Accept template arguments as a TREE_LIST.
	(write_expression): Adjust handling of qualified names to match

2002-10-15  Jason Merrill  <>

	* call.c (call_builtin_trap): New fn.
	(convert_arg_to_ellipsis): Use it.  Downgrade error to warning.
	(build_call): Don't set current_function_returns_abnormally outside
	a function.

2002-10-14  Mark Mitchell  <>

	* class.c (check_field_decls): Remove empty_p parameter.  Instead,
	(build_base_field): Likewise.
	(build_base_fields): Likewise.
	(check_bases_and_members): Likewise.
	(create_vtbl_ptr): Likewise.
	(layout_class_type): Likewise.  Ensure that empty classes have
	size zero when used as base classes in the 3.2 ABI.
	(finish_struct_1): Initialize CLASSTYPE_EMPTY_P and
	CLASSTYPE_NEARLY_EMPTY_P.  Adjust calls to avoid passing empty_p
	(is_empty_class): Correct definition when using post-3.2 ABI.
	* cp-tree.h (lang_type_class): Add empty_p.
	(CLASSTYPE_EMPTY_P): New macro.

2002-10-12  Nathan Sidwell  <>

	* init.c (build_delete): Do not apply save_expr for arrays.
	(build_vec_delete): Likewise.

2002-10-14  Mark Mitchell  <>

	* decl.c (layout_var_decl): Call layout_decl even for variables
	whose type is an array with unspecified bounds.

	PR c++/7176
	* lex.c (do_identifier): Add another option for the parsing
	* parse.y (do_id): Use it.

2002-10-11  Gabriel Dos Reis  <>

	PRs C++/6803, C++/7721 and C++/7803
	* decl.c (grokdeclarator): Gracefully handle template-name as

2002-10-11  Jason Molenda  <>

	* init.c (build_field_list): Provide uses_unions_p with a default

2002-10-11  Mark Mitchell  <>

	PR c++/5661
	* cp-tree.h (variably_modified_type_p): New function.
	(grokdeclarator) Tighten check for variably modified types as
	* pt.c (convert_template_argument): Do not allow variably modified
	types as template arguments.
	* tree.c (variably_modified_type_p): New function.

	* NEWS: Document removal of "new X = ..." extension.
	* class.c (initialize_array): Set TREE_HAS_CONSTRUCTOR on
	brace-enclosed initializers.
	* cp-tree.h (CP_AGGREGATE_TYPE_P): New macro.
	(initialize_local_var): Remove declaration.
	(expand_static_init): Likewise.
	* decl.c (next_initializable_field): New function.
	(reshape_init): Likewise.
	(check_initializer): Use them.  Build dynamic initializer for
	aggregates here too.
	(initialize_local_var): Simplify, and incorporate cleanup
	insertion code as well.
	(destroy_local_var): Remove.
	(cp_finish_decl): Tidy.
	(expand_static_init): Fold checks for whether or not a variable
	needs initialization into this function.  Simplify.
	* decl2.c (do_static_initialization): Simplify.
	* init.c (build_init): Do not set TREE_SIDE_EFFECTS when it will
	be done for us automatically.
	(expand_default_init): Handle brace-enclosed initializers
	(expand_aggr_init_1): Remove RTL-generation code.
	(build_vec_init): Remove "new X = ..." support.
	* parse.y (new_initializer): Likewise.
	* rtti.c (get_pseudo_ti_init): Set TREE_HAS_CONSTRUCTOR on
	brace-enclosed initializer.
	(create_pseudo_type_info): Likewise.
	* typeck2.c (store_init_value): Don't try to handle digest_init
	being called more than once.
	(digest_init): Tidy handling of brace-enclosed initializers.

2002-10-10  Kaveh R. Ghazi  <>

	* decl.c (typename_hash): Use htab_hash_pointer.

2002-10-10  Jim Wilson  <>

	* decl.c (duplicate_decls): Don't call decl_attributes.

2002-10-09  Zack Weinberg  <>

	PR c/7353
	* decl.c (start_decl): Unconditionally issue error for
	'typedef foo = bar'.
	(cp_finish_decl): Remove special case for TYPE_DECL with initializer.
	(grokdeclarator): Remove redundant error for 'typedef foo = bar'.

2002-10-09  Kaveh R. Ghazi  <>

	* decl2.c (prune_vtable_vardecl): Delete unused function.

2002-10-03  Mark Mitchell  <>

	PR c++/7754
	* decl2.c (finish_anon_union): Do not expand anonymous unions when
	procesing template functions.
	* pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
	type. Call layout_decl.
	(tsubst_expr, case DECL_STMT): Handle anonymous unions.

2002-10-07  Richard Henderson  <>

	* decl2.c, pt.c: Revert c++/7754 fix.

2002-10-05  Kriang Lerdsuwanakij  <>

	PR c++/7804
	* error.c (dump_expr) [REAL_CST]: Output in decimal format.

2002-10-03  Mark Mitchell  <>

 	PR c++/7931
	* pt.c (for_each_template_parm_r): Handle BASELINKs.

	PR c++/7754
	* decl2.c (finish_anon_union): Do not expand anonymous unions when
	procesing template functions.
	* pt.c (tsubst_decl, case VAR_DECL): Try to complete the variable
	type. Call layout_decl.
	(tsubst_expr, case DECL_STMT): Handle anonymous unions.

2002-10-03  Mark Mitchell  <>

	PR c++/8006
	* mangle.c (CLASSTYPE_TEMPLATE_ID_P): Handle instances of template
	template parameters.
	(globals): Add entity and need_abi_warning.
	(decl_is_template_id): Use TYPE_TEMPLATE_INFO, not
	(is_std_substitution): Use CLASSTYPE_TI_TEMPLATE, not
	(write_prefix): Handle typename types correctly.
	(write_template_prefix): Handle template template parameters
	(start_mangling): Add entity parameter.
	(finish_mangling): Warn about names whose mangling will change.
	(mangle_decl_string): Adjust.
	(mangle_type_string): Likewise.
	(mangle_special_for_type): Likewise.
	(mangle_ctor_vtbl_for_type): Likewise.
	(mangle_thunk): Likewise.
	(mangle_guard_variable): Likewise.
	(mangle_ref_init_variable): Likewise.

2002-10-02  Mark Mitchell  <>

	PR c++/7188.
	* cp-tree.def (CTOR_INITIALIZER): Use one slot, not two.
	* cp-tree.h (emit_base_init): Rename to ....
	(emit_mem_initializers): ... this.
	(expand_member_init): Change prototype.
	* init.c (perform_member_init): Compute explicit, rather than
	requiring it as a parameter.
	(sort_member_init): Rename to ...
	(sort_mem_initializers): ... this.  Process bases and data members
	(sort_base_init): Remove.
	(emit_base_init): Rename to ...
	(emit_mem_initializers): ... this.
	(expand_aggr_vbase_init_1): Remove.
	(construct_virtual_bases): Rename to ...
	(construct_virtual_base): ... this.
	(expand_member_init): Rework handling of base initializers.
	* method.c (do_build_copy_constructor): Use
	* parse.y (member_init): Adjust calls to expand_member_init.
	* pt.c (tsubst_expr): Simplify CTOR_INITIALIZER case.
	(tsubst_initializer_list): Use expand_member_init.
	* semantics.c (finish_mem_intiailizers): Simplify.

2002-10-02  Matt Austern  <>
	* decl.c (walk_vtables_r): Fixed typo that caused result to
	never get a nonzero value.

2002-10-02  Roger Sayle  <>

	PR optimization/6627
	* cp-tree.h (enum ptrmemfunc_vbit_where_t): Delete definition
	from here, and move it to tree.h.
	* decl.c (cxx_init_decl_processing): If storing the vbit
	in function pointers, ensure that force_align_functions_log
	is atleast one.

2002-10-02  Matt Austern  <>

	* class.c (check_field_decls): Changed warning about const member
	variables so that it doesn't get issued for a class aggregate.

2002-10-01  Mark Mitchell  <>

	* decl.c (cp_finish_decl): Make sure array types are laid out,
	even if the array bounds are unknown.

2002-10-01  Steve Ellcey  <>

	* class.c (build_vtbl_initializer): Change build_c_cast
	to build1.

2002-10-01  Mark Mitchell  <>

	* decl.c (cp_finish_decl): Make sure array types are laid out,
	even if the array bounds are unknown.

	* decl.c (cp_finish_decl): Correct check for dynamic
	initialization of thread-local storage.

2002-09-30  Nathan Sidwell  <>

	* tree.c (really_overloaded_fn): TEMPLATE_ID_EXPRs are also

2002-09-30  Steve Ellcey  <>

	* class.c (build_vtbl_initializer): Add cast.

2002-09-30  Mark Mitchell  <>

	* class.c (walk_subobject_offsets): Correct the calculation of
	offsets for virtual bases.  Correct the counting of array
	(layout_nonempty_base_or_field): Simplify.  Correct the
	calculation of offsets to be propagated through the binfo
	(build_base_field): Avoid creating a FIELD_DECL for empty bases.
	(build_base_fields): Adjust accordingly.
	(layout_virtual_bases): Use build_base_field.
	(end_of_class): Return a tree, not an integer.
	(warn_about_ambiguous_direct_bases): Rename to ...
	(warn_about_ambiguous_bases): ... this.
	(include_empty_classes): New function.
	(layout_class_type): Create an alternative version of the type to
	be used when as a base class type.  Do not call
	finish_record_layout until we are done laying out the class.
	* cp-tree.h (lang_type_class): Remove size, size_unit.  Add
	(CLASSTYPE_SIZE): Reimplement.
	(CLASSTYPE_AS_BASE): New macro.
	(extract_init): Remove prototype.
	(build_forced_zero_init): Rename to ...
	(build_zero_init): ... this.
	(force_store_init_value): Remove.
	* decl.c (obscure_complex_init): Remove.
	(duplicate_decls): Copy DECL_INITIALIZED_P.
	(check_initializer): Do not leave junk in DECL_INITIAL.
	(cp_finish_decl): Handle zero-initialization of entities with
	static storage duration.
	* expr.c (extract_init): Remove.
	* init.c (build_forced_zero_init): Remove.
	(build_zero_init): New function.
	(build_default_init): Use it.
	(build_field_list): Skip FIELD_DECLs for base subobjects.
	(push_base_cleanups): Likewise.
	* method.c (do_build_assign_ref): Likewise.
	(synthesize_exception_spec): Likewise.
	* pt.c (tsubst_decl): Clear DECL_INITIALIZED_P.
	(regenerate_decl_from_template): To not set DECL_INITIAL for a
	static data member whose initialization took place in its class.
	(instantiate_decl): Do not pass an initializer to cp_finish_decl
	in that situation.
	* search.c (dfs_push_decls): Skip FIELD_DECLs for base subobjects.
	(dfs_unuse_fields): Likewise.
	* tree.c (pod_type_p): Handle error_mark_node.
	(zero_init_p): Likewise.
	* typeck.c (lookup_anon_field): Skip FIELD_DECLs for base
	* typeck2.c (store_init_value): Remove #if 0'd code.
	(force_store_init_value): Remove.
	(process_init_constructor): Use build_zero_init.

2002-09-29  Nathan Sidwell  <>

	PR c++/7788
	* rtti.c (unemitted_tinfo_decl_p): Check it has a field.

2002-09-29  Kazu Hirata  <>

	* cp-tree.h: Fix comment typos.
	* decl.c: Likewise.
	* pt.c: Likewise.

2002-09-25  Mark Mitchell  <>

	* cp/class.c (contains_empty_class_p): New method.
	(walk_subobject_offsets): Correct computation of field offset.
	(layout_empty_base): Correct placement of emtpy base classes.
	(layout_class_type): Warn about ABI changes.

2002-09-23  Mark Mitchell  <>

	* cp/class.c (layout_virtual_bases): Do not round the size of the
	type to a multiple of the alignment before laying out virtual bases.
	(layout_class_type): Correct handling of bit-fields that are wider
	than their type inside unions.  Round the size of the type to a
	even number of bytes when computing the size without virtual
	* cp/cp-tree.h (abi_version_at_least): New macro.

2002-09-21  Kazu Hirata  <>

	* ChangeLog: Follow spelling conventions.
	* ChangeLog.2: Likewise.
	* call.c: Likewise.
	* class.c: Likewise.
	* cp-tree.h: Likewise.
	* cvt.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* except.c: Likewise.
	* friend.c: Likewise.
	* g++spec.c: Likewise.
	* init.c: Likewise.
	* lex.c: Likewise.
	* mangle.c: Likewise.
	* method.c: Likewise.
	* operators.def: Likewise.
	* optimize.c: Likewise.
	* pt.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* semantics.c: Likewise.
	* spew.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.

2002-09-18  Devang Patel  <>

	* cp/cp-tree.h: New prototype for walk_vtabls().
	* cp/decl.c (walk_vtables_r): New function.
	(struct cp_binding_level): Add new members, namespaces,
	names_size and vtables.
	(add_decl_to_level): Add decl in namespaces or vtables
	chain, if conditions match.
	(walk_vtables): New function.
	(walk_namespaces_r): Travers separate namespace chain
	for namespace decls.
	(wrapup_globals_for_namespace): Use names_size instead
	of list_length().
	* cp/decl2.c (finish_file): Use walk_vtables() instead of
	walk_globals() to walk vtable decls.

2002-09-18  Nathan Sidwell  <>

	* decl.c (grokdeclarator): Use assert, not internal_error. Don't
	ICE with invalid pointers & references.

2002-09-17  Zack Weinberg  <>

	* Remove all references to the demangler.
	* cxxfilt.c: Moved to binutils.

2002-09-16  Nathan Sidwell  <>

	PR c++/7718
	* pt.c (tsubst_decl): Remove assert.

	Remove DR 295 implementation.
	* pt.c (check_cv_quals_for_unify): Disable function & method cases.
	* tree.c (cp_build_qualified_type_real): Likewise. Don't warn
	about ignoring volatile qualifiers.

	* search.c (lookup_member): Correct documentation.

2002-09-16  Geoffrey Keating  <>

	* cp-tree.h (union lang_tree_node): Add chain_next option.

2002-09-16  Nathan Sidwell  <>

	* parse.y (parse_finish_call_expr): Check lookup_member result.

	PR c++/7015
	* semantic.c (finish_asm_stmt): Fix operand/output_operands
	* typeck.c (c_expand_asm_operands): Protect from error_mark_node.

2002-09-15  Nathan Sidwell  <>

	PR c++/7919
	* call.c (build_over_call): Convert this pointer for fns found by
	using decls.

2002-09-15  Kazu Hirata  <>

	* ChangeLog: Follow spelling conventions.
	* ChangeLog.1: Likewise.

2002-09-14  Nathan Sidwell  <>

	PR c++/7768
	* pt.c (build_template_decl): Copy DECL_DESTRUCTOR_P.

2002-09-14  Kazu Hirata  <>

	* error.c: Fix comment formatting.
	* except.c: Likewise.
	* expr.c: Likewise.
	* friend.c: Likewise.
	* g++spec.c: Likewise.
	* init.c: Likewise.
	* lex.c: Likewise.
	* mangle.c: Likewise.
	* method.c: Likewise.
	* optimize.c: Likewise.
	* pt.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* semantics.c: Likewise.
	* spew.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.

2002-09-13  Matt Austern  <>

	PR C++/7828
	* cp/cp-tree.h, cp/tree.c: New function non_cast_lvalue_p.
	* cp/call.c: Change call-by-const-reference mechanism to use
	non_cast_lvalue_p when deciding whether the create a temporary.
	We need a temporary when passing, e.g. (long) x by const ref.

2002-09-13  Nathan Sidwell  <>

	* pt.c (unify, ARRAY_TYPE): Element type can be more qualified.

2002-09-13  Kazu Hirata  <>

	* decl.c: Fix comment formatting.
	* decl2.c: Likewise.

2002-09-12  Kazu Hirata  <>

	* call.c: Fix comment formatting.
	* class.c: Likewise.
	* cp-lang.c: Likewise.
	* cp-tree.h: Likewise.
	* cvt.c: Likewise.

2002-09-11  Zack Weinberg  <>

	* Build cp/cxxfilt.o from $(srcdir)/cp/cxxfilt.c,
	and c++filt from cxxfilt.o + version.o + $(LIBDEPS).
	* cxxfilt.c: New file: split from libiberty/cplus-dem.c, with
	minor adjustments (use version_string, eliminate yet another
	duplicate of xmalloc)

2002-09-08  Kaveh R. Ghazi  <>

	* cp-tree.h (require_complete_eh_spec_types): Add prototype.

2002-09-05  Jason Merrill  <>

	* typeck2.c (add_exception_specifier): Only pedwarn for an
	incomplete type.
	(require_complete_eh_spec_types): New fn.
	(cxx_incomplete_type_diagnostic): Also support pedwarning.
	* typeck.c (complete_type_or_diagnostic): Likewise.
	* call.c (build_call): Call require_complete_eh_spec_types.
	* rtti.c (get_pseudo_ti_desc): Give an error rather than aborting
	on an incomplete type.

2002-09-04  Jakub Jelinek  <>

	* decl.c (start_cleanup_fn): Clear interface_only before
	start_function, restore it afterwards.

2002-08-31  Jason Merrill  <>

	* cp-lang.c (cp_expr_size): Allow initialization from a

2002-08-30  Richard Henderson  <>

	PR opt/7515
	* tree.c: Include target.h.
	(cp_cannot_inline_tree_fn): Don't auto-inline functions that
	don't bind locally.
	* (tree.o): Update.

2002-08-27  Mark Mitchell  <>

	* class.c (layout_virtual_bases): Warn about bugs in G++ that
	result in incorrect object layouts.
	(layout_class_type): Likewise.

2002-08-24  Matt Austern  <>

	* tree.c (lvalue_p_1): Add argument for whether casts of lvalues
	are allowable.
	(real_lvalue_p): Update caller.
	(lvalue_p): Ditto.
	(non_cast_lvalue_or_else): New.
	* tree.h: Declare it.
	* typeck.c (build_unary_op): Use non_cast_lvalue_or_else.

2002-08-22  Mark Mitchell  <>

	* typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
	and COND_EXPR specially; fix error message output.

2002-08-22  Jason Merrill  <>

	* pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
	* semantics.c (nullify_returns_r): Likewise.

2002-08-17  Gabriel Dos Reis  <>

	Fix PR/7621
	* typeck.c (finish_class_member_access_expr): Diagnose cases where
	name lookup finds nothing.

2002-08-15  Jason Merrill  <>

	* semantics.c (finish_then_clause): Remove redundant assignment.
	(finish_if_stmt, begin_switch_stmt, finish_switch_stmt): Move the
	extra binding level outside the if/switch statement.
	(finish_while_cond, finish_for_cond): Rewrite complex condition
	into the loop body.

2002-08-15  Alexandre Oliva  <>

	* parse.y (sizeof, alignof, typeof): New non-terminals to
	increment skip_evaluation.  Replace terminals with them and
	decrement skip_evaluation at the end of rules using them.
	* decl2.c (mark_used): Don't assemble_external if
	skipping evaluation.

2002-08-15  Gabriel Dos Reis  <>

	Fix PR/7504
	* parse.y (parse_finish_call_expr): Handle incomplete
	type used to name a scope.

2002-08-15  Nathan Sidwell  <>

	PR c++/7598
	* typeck.c (build_unary_op): Fold offsetof idiom. Fixes
	regression caused by my 2002-08-08 patch.

2002-08-13  Mark Mitchell  <>

	* decl.c (pushdecl_class_level): Honor requests to bind names to

2002-08-11  Kaveh R. Ghazi  <>

	* decl2.c (build_call_from_tree): Fix uninitialized variable.
	* parse.y (parse_finish_call_expr): Likewise.
	* repo.c (old_args, old_dir, old_main): Const-ify.

2002-08-11  Gabriel Dos Reis  <>

	* decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
	* optimize.c (maybe_clone_body): Likewise.
	* pt.c (tsubst_enum): Likewise.
	(lookup_template_class): Likewise.
	* tree.c (cp_copy_res_decl_for_inlining): Likewise.

2002-08-10  Neil Booth  <>

	* lang-specs.h: Remove -ansi.

2002-08-10  Nathan Sidwell  <>

	* tree.c (maybe_dummy_object): Replace // with /* */

2002-08-09  Mark Mitchell  <>

	* call.c (standard_conversion): Use build_ptrmem_type.
	* cp-tree.h (build_ptrmem_type): New function.
	(adjust_result_of_qualified_name_lookup): Likewise.
	* decl.c (grokvardecl): Do not look for OFFSET_TYPEs to indicate
	static data members.
	(build_ptrmem_type): New function.
	(grokdeclarator): Do not use build_offset_type when encountering a
	qualified name.
	* parse.y (parse_finish_call_expr): Use
	* search.c (adjust_result_of_qualified_name_lookup): New function.
	* typeck.c (qualify_type_recursive): Use TYPE_PTRMEM_* rather than
	accessing OFFSET_TYPEs directly.

2002-08-08  Mike Stump  <>

	* call.c (add_builtin_candidate): legal -> valid, illegal -> invalid.
	(type_decays_to): Likewise.
	* class.c (find_final_overrider): Likewise.
	(maybe_note_name_used_in_class): Likewise.
	* decl.c (current_tmpl_spec_kind): Likewise.
	(add_binding): Likewise.
	(push_class_binding): Likewise.
	(duplicate_decls): Likewise.
	(layout_var_decl): Likewise.
	(grokfndecl): Likewise.
	(grokdeclarator): Likewise.
	(check_default_argument): Likewise.
	* decl2.c (handle_class_head): Likewise.
	* error.c (dump_template_decl): Likewise.
	* init.c (build_offset_ref): Likewise.
	* pt.c (check_specialization_scope): Likewise.
	(determine_specialization): Likewise.
	(check_explicit_specialization): Likewise.
	(maybe_check_template_type): Likewise.
	(process_partial_specialization): Likewise.
	(check_default_tmpl_args): Likewise.
	(push_template_decl_real): Likewise.
	(convert_template_argument): Likewise.
	(try_class_unification): Likewise.
	(get_bindings_real): Likewise.
	(do_decl_instantiation): Likewise.
	* semantics.c (begin_function_definition): Likewise.
	(finish_member_declaration): Likewise.
	(check_multiple_declarators): Likewise.
	* typeck.c (comp_array_types): Likewise.
	(comptypes): Likewise.
	(expr_sizeof): Likewise.
	(build_binary_op): Likewise.
	(dubious_conversion_warnings): Likewise.
	(check_return_expr): Likewise.

2002-08-08  Mark Mitchell  <>

	* typeck.c (build_class_member_access_expr): Do not return
	error_mark_node when no error has occurred.

2002-08-08  Nathan Sidwell  <>

	* typeck.c (build_component_addr): Remove.
	(build_unary_op): Just check it's not a bitfield, and then build

2002-08-08  Nathan Sidwell  <>

	* class.c (convert_to_base): Correct check for error_mark_node.
	(create_vtable_ptr): Remove unused VFUNS_P parm.

2002-08-08  Nathan Sidwell  <>

	* cp/ (c++.mostlyclean): Remove coverage files.

2002-08-07  Mark Mitchell  <>

	Rework build_component_ref.
	* call.c (build_vfield_ref): Do not go through build_component_ref.
	(build_field_call): Use build_class_member_access_expr.
	(build_user_type_conversion_1): Use BASELINK_FUNCTIONS.
	(build_object_call): Likewise.
	* class.c (convert_to_base): New function.
	(type_requires_array_cookie): Use BASELINK_FUNCTIONS.
	(instantiate_type): Handle BASELINKs.
	* cp-tree.def (BASELINK): New tree code.
	* cp-tree.h (BASELINK_P): Reimplement.
	(SET_BASELINK_P): Remove.
	(BASELINK_BINFO): Reimplement.
	(convert_to_base): New function.
	(name_p): Likewise.
	(build_object_ref): Remove.
	(build_component_ref_1): Likewise.
	(build_component_ref): Likewise.
	(build_x_component_ref): Likewise.
	(build_class_member_access_expr): New function.
	(finish_class_member_access_expr): Likewise.
	(build_ptrmemfunc_access_expr): Likewise.
	* decl.c (grokdeclarator): Handle BASELINKs.
	* decl2. (build_expr_from_tree): Handle COMPONENT_REFs by using
	(arg_assoc): Handle BASELINKs.
	(do_class_using_decl): Likewise.
	* error.c (dump_decl): Likewise.
	(dump_expr): Use build_ptrmemfunc_access_expr.
	* except.c (dtor_nothrow): Use CLASSTYPE_DESTRUCTORS to find
	(build_throw): Use BASELINK_FUNCTIONS.
	* init.c (perform_member_init): Use
	(build_offset_ref): Handle BASELINKs.  Use
	* method.c (hack_identifier): Likewise.
	* parse.y (do_id): Use BASELINK, not TREE_LIST.
	(primary): Remove uses of build_object_ref.
	* pt.c (lookup_template_function): Handle BASELINKs.
	(resolve_overloaded_unification): Likewise.
	* search.c (build_baselink): Build a BASELINK, not a TREE_LIST.
	(lookup_field): Use BASELINK, not TREE_LIST.
	(lookup_fnfiels): Likewise.
	(setup_class_bindings): Likewise.
	* semantics.c (finish_object_call_expr): Do not use
	build_method_call when we already know what function is being
	* spew.c (identifier_type): Use BASELINK, not TREE_LIST.
	* tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
	(name_p): New function.
	* typeck.c (build_object_ref): Remove.
	(build_component_ref_1): Likewise.
	(build_x_component_ref): Likewise.
	(build_class_member_access_expr): New function.
	(finish_class_member_access_expr): Likewise.
	(build_ptrmemfunc_access_expr): Likewise.
	(get_member_function_from_ptrfunc): Use
	(build_binary_op): Likewise.
	(build_unary_op): Likewise.
	(build_ptrmemfunc): Likewise.
	(pfn_from_ptrmemfunc): Likewise.
	* typeck2.c (build_m_component_ref): Adjust comment.

2002-08-07  Neil Booth  <>

	* (CXX_C_OBJS): Update.
	* cp-lang.c (LANG_HOOKS_DECODE_OPTION): Use c_common_decode_option.
	* cp-tree.h (cxx_decode_option): Remove.
	* decl2.c (compare_options, lang_f_options, unsupported_options,
	cxx_decode_option): Remove.

2002-08-06  Gabriel Dos Reis  <>

	* typeck.c (build_x_unary_op): Handle pointer-to-member.

2002-08-05  Geoffrey Keating  <>

	* class.c: Don't include obstack.h.
	* decl2.c: Delete bogus comment.
	* error.c: Don't include obstack.h.
	* except.c: Likewise.
	(dump_type): Correct comment.
	* method.c: Don't include obstack.h.
	* tree.c: Likewise.

2002-08-04  Gabriel Dos Reis  <>

	Fix PR/2213
	* cvt.c (cp_convert_to_pointer): Reject conversions from integral
	expressions to pointer-to-data-member of pointer-to-member-functions.

2002-08-04  Geoffrey Keating  <>

	* cvt.c (ocp_convert): Delete obsolete code.
	* parse.y (permanent_obstack): Delete declaration.
	* pt.c (permanent_obstack): Delete declaration.
	* repo.c (permanent_obstack): Delete declaration.
	(open_repo_file): Use xmalloc instead of permanent_obstack.
	(init_repo): Use xstrdup instead of permanent_obstack.

2002-08-04  Nathan Sidwell  <>

	* cp-tree.h (VF_DERIVED_VALUE): Remove.
	* class.c (finish_struct_1): Use VF_BINFO_VALUE not VF_DERIVED_VALUE.

2002-08-03  Nathan Sidwell  <>

	PR 7470.
	C++ ABI change - vfunc ordering.
	* class.c (add_virtual_function): Remove.
	(dfs_modify_all_vtables): Take list of all declared
	virtuals. Assign all that are not in primary base.
	(check_for_override): Adjust comments.
	(create_vtable_ptr): Take single list of virtuals. Build chain
	of declared virtuals here.
	(layout_class_type): Take single list of virtuals. Adjust.
	(finish_struct_1): Keep virtuals on single list. Adjust.

2002-08-02  Mark Mitchell  <>

	* init.c (build_member_call): Use build_new_method_call, not

2002-08-02  Krister Walfridsson  <>

	* (spew.o, lex.o, pt.o): Add path to parse.h dependencies.

2002-08-02  Mark Mitchell  <>

	* call.c (build_method_call): Issue a more helpful error message
	about ambiguous method names.

2002-08-02  Nathan Sidwell  <>

	* tree.c (build_shared_int_cst): Make cache file scope, and
	GTY it.

2002-08-02  Jason Merrill  <>

	* cp-lang.c (LANG_HOOKS_EXPR_SIZE): Define.
	(cp_expr_size): New fn.
	* call.c (build_over_call): Lose empty class hackery.
	(convert_arg_to_ellipsis): Promote non-POD warning to error.
	* typeck.c (build_modify_expr): Don't use save_expr on an lvalue.

	* semantics.c (expand_body): Do tree optimization in the function
	context, too.

2002-08-01  Neil Booth  <>

	* cp-tree.h: Move all warning and flag declarations to c-common.h.
	* decl.c: Move all warning and flag variables to c-common.c.
	* decl2.c: Move all warning and flag variables to c-common.c.
	* lex.c (flag_digraphs): Remove.
	(warn_traditional): Now in c-common.c.

2002-07-31  Mark Mitchell  <>

	* call.c (build_field_call): Do not look up the field by name.
	(build_method_call): Simplify.
	(struct z_candidate): Add access_path and conversion_path.  Remove
	(convert_class_to_reference): Adjust use of
	(add_candidate): Add conversion_path argument.
	(add_function_candidate): Use it.
	(add_conv_dndidate): Likewise.
	(build_builtin_candidate): Likewise.
	(add_template_candidate_real): Add conversion_path argument.
	(add_template_conv_candidate): Likewise.
	(add_template_candidate): Likewise.
	(build_user_type_conversion_1): Use it.
	(build_new_function_call): Remove name lookup code.  Adjust use of
	add_template_candidate and add_function_candidate.
	(build_new_op): Likewise.
	(convert_like_real): Use build_special_member_call.
	(build_over_call): Use cand->conversion_path.
	(build_special_member_call): New method.
	(build_new_method_call): Remove name lookup code.
	* cp-tree.def (OFFSET_REF): Update documentation.
	(TEMPLATE_ID_EXPR): Likewise.
	* cp-tree.h (BASELINK_ACCESS_BINFO): New macro.
	(build_new_method_call): Adjust prototype.
	(build_special_member_call): New method.
	(build_baselink): New method.
	(build_offset_ref_call_from_tree): Likewise.
	(build_call_from_tree): Likewise.
	(finish_qualified_call_expr): Remove.
	(finish_call_expr): Adjust prototype.
	(build_x_function_call): Remove.
	* cvt.c (ocp_convert): Use build_special_member_call.
	* decl2.c (reparse_absdcl_as_expr): Use finish_call_expr.
	(build_expr_from_tree): Adjust handling for TEMPLATE_ID_EXPR and
	(build_offset_ref_call_from_tree): New function.
	(build_call_from_tree): Likewise.
	* init.c (expand_cleanup): Use build_special_member_call.
	(expand_default_init): Likewise.
	(build_member_call): Use finish_call_expr.
	(build_new_1): Use build_special_member_call.
	(push_base_cleanups): Likewise.
	* method.c (do_build_assign_ref): Likewise.
	* parse.y (template_id): Do not pass a COMPONENT_REF to
	(primary): Use parse_finish_call_epxr, not finish_call_expr.
	(parse_finish_call_expr): New function.
	* pt.c (lookup_template_function): Add assertions.
	* search.c (lookup_base): Allow T to be a binfo.
	(build_baselink): New function.
	(lookup_member): Use it.
	* semantics.c (finish_call_expr): Do not do name lookup.
	(finish_object_call_expr): Remove #if 0'd code.
	(finish_qualified_call_expr): Remove.
	* typeck.c (build_x_function_call): Remove.
	(build_static_case): Use build_special_member_call.
	* typeck2.c (build_functional_cast): Likewise.

2002-07-30  Franz Sirl  <>

	* lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.

2002-07-30  Gabriel Dos Reis  <>

	* cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.

2002-07-30  Nathan Sidwell  <>

	* cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more

2002-07-29  Alan Modra  <>

	* cp-tree.h: Comment typo fix.

2002-07-29  Richard Earnshaw  <>

	* spew.c (space_for_token): Allocate zeroed memory for a new token

2002-07-27  Roger Sayle  <>

	* decl.c (builtin_function_1): No need to explicitly mark

2002-07-27  Roger Sayle  <>

	* decl2.c (cxx_decode_option): Support -fno-builtin-foo.

2002-07-26  Jason Merrill  <>

	* call.c (build_over_call): Likewise.
	(cp_convert_parm_for_inlining): New fn.
	(convert_for_arg_passing): New fn.
	(convert_default_arg, build_over_call): Use it.
	(type_passed_as): New fn.
	* pt.c (tsubst_decl): Use it.
	* decl2.c (cp_build_parm_decl): New fn.
	(build_artificial_parm): Use it.
	(start_static_storage_duration_function): Likewise.
	* decl.c (start_cleanup_fn, grokdeclarater): Likewise.
	(grokparms): Don't mess with DECL_ARG_TYPE.
	* typeck.c (convert_arguments): Use convert_for_arg_passing.
	* cp-tree.h: Declare new fns.

2002-07-26  Neil Booth  <>

	* cp-tree.h (flag_operator_names): Remove.
	* decl2.c (flag_operator_names): Remove.
	(lang_f_options): Remove operator-names.
	* lex.c (D_OPNAME): Remove.
	(reswords): Remove operator names.
	(rid_to_yy): Remove operator names.
	(init_reswords): No need to handle D_OPNAME.
	* spew.c (read_process_identifier): There are no operator

2002-07-26  Jason Merrill  <>

	* dump.c (cp_dump_tree): Call c_dump_tree.
	* (CXX_C_OBJS): Add c-dump.o.

2002-07-25  Neil Booth  <>

	* error.c (print_whitespace): Remove.
	* g++spec.c (LIBUNWIND): Move.
	* mangle.c (mangled_position, write_signed_number): Remove.

2002-07-25  Neil Booth  <>

	* decl2.c (cxx_decode_option): Similarly.

2002-07-25  Gabriel Dos Reis  <>

	* cp-tree.h (cxx_sizeof_nowarn): Now a macro.
	(cxx_sizeof_or_alignof_type): Take a third argument.
	(cxx_sizeof): Adjust definition.
	(cxx_alignof): Likewise.
	* init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
	* typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
	(c_sizeof_nowarn): Remove definition.
	(build_unary_op): Use cxx_sizeof_nowarn.

2002-07-24  Geoffrey Keating  <>

	* tree.c (cp_build_qualified_type_real): When copying
	pointer-to-method types, unshare the record that holds
	the cached pointer-to-member-function type.

2002-07-23  Neil Booth  <>

	* cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.

2002-07-23  Gabriel Dos Reis  <>

	Fix PR/7363:
	* typeck.c (cxx_sizeof_or_alignof_type): New function.
	(c_sizeof): Remove definition.
	(expr_sizeof): Use cxx_sizeof.
	* decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
	* decl.c (finish_destructor_body): Use cxx_sizeof.
	* semantics.c (finish_alignof): Likewise.
	(finish_alignof): Use cxx_alignof.
	* cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
	(cxx_sizeof_or_alignof_type): Declare.
	(my_friendly_assert): Move to ../c-common.h.

2002-07-23  Neil Booth  <>

	* class.c, method.c, pt.c, search.c: Don't define obstack macros.

2002-07-22  Kriang Lerdsuwanakij  <>

	PR c++/7347, c++/7348
	* cp-tree.h (tsubst_flags_t): Add tf_parsing.
	* decl.c (make_typename_type): Use it.
	(make_unbound_class_template): Likewise.
	(lookup_name_real): Don't call type_access_control if scope is
	template parameter dependent.
	* parse.y (template_arg): Call make_unbound_class_template with
	tf_parsing set.
	(nest_name_specifier): Call make_typename_type with tf_parsing set.
	(typename_sub0): Likewise.
	(typename_sub1): Likewise.
	(instantiate_decl): Push class scope.
	* pt.c (regenerate_decl_from_template): Call pushclass and popclass
	for both static variable and member function template.
	(instantiate_decl) Call pushclass and popclass when tsubst'ing type
	and arguments.
	* search.c (type_access_control): Do type access for TEMPLATE_DECL

2002-07-20  Roger Sayle  <>

	* decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
	test by using positive_option.  Make whitespace consistent.

2002-07-20  Gabriel Dos Reis  <>

	* spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
	members with 'locus'.  Adjust use throughout.
	(struct feed):  Likewise.
	(alloc_unparsed_test): Change prototype, take a 'const location_t *'.
	Adjust use.
	(snarf_defarg): Use error(), not error_with_file_and_line().

2002-07-19  Chris Demetriou  <>

	* lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
	cpp_options is included.

2002-07-17  Kriang Lerdsuwanakij  <>

	PR c++/2862, c++/2863
	* pt.c (determine_specialization): Compare the length of

2002-07-17  Kriang Lerdsuwanakij  <>

	PR c++/3797
	* decl.c (duplicate_decls): Don't propagate inlining parameters from
	olddecl to newdecl when newdecl is a specialization of the
	instantiation olddecl.

2002-07-17  Kriang Lerdsuwanakij  <>

	PR c++/4802, c++/5387
	* decl.c (make_typename_type): Use enforce_access.

2002-07-17  Scott Snyder <>

	PR c++/7320
	* rtti.c (get_tinfo_decl): Set DECL_COMDAT.

2002-07-12  Mark Mitchell  <>

	* class.c (add_method): Correct handling of conversion operators.

2002-07-11  Mark Mitchell  <>

	PR c++/7224
	* class.c (add_method): Simplify.

2002-07-11  Jason Merrill  <>

	PR c++/7279
	* tree.c (cp_copy_res_decl_for_inlining): Also copy

2002-07-10  Graham Stott  <>

	* pt.c (template_parm_this_level_p, push_template_decl_real):
	Pass depth as int pointer.

2002-07-11  Tim Josling  <>

	Remove front end hard coding from gengtype.c.

	* (gtfiles): Add files needed for this front end.

2002-07-10  Mark Mitchell  <>

	* cp-tree.h (unqualified_name_lookup_error): Declare it.
	(begin_function_definition): Adjust prototype.
	* lex.c (unqualified_name_lookup_error): New function, split out
	from ...
	(do_identifier): ... here.
	* parse.y (parse_begin_function_definition): New function.
	(fn.def1): Use it.
	* semantics.c (begin_function_definition): Accept decl-specifiers
	and attributes as separate parameters.

2002-07-10  Jason Merrill  <>

	PR c++/6255
	* decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
	modifying the old one.

2002-07-09  Mark Mitchell  <>

	* cp-tree.h (constructor_name_p): Declare it.
	(check_template_template_default_arg): Likewise.
	* class.c (handle_using_decl): Use constructor_name_p.
	* decl.c (grokdeclarator): Likewise.
	* decl2.c (constructor_name_p): Define it.
	* init.c (build_member_call): Use constructor_name_p.
	* parse.y (template_parm): Use check_template_template_default_arg.
	* pt.c (check_explicit_specialization): Use constructor_name_p.
	* semantics.c (check_template_template_default_arg): New function.

2002-07-08  Kriang Lerdsuwanakij  <>

	* pt.c (can_complete_type_without_circularity): Add static to
	function definition.

2002-07-08  Mark Mitchell  <>

	* cp-tree.h (have_extern_spec): Declare it
	* decl.c (have_extern_spec): Define it.
	(start_decl): Eliminate use of used_extern_spec.
	(start_function): Likewise.
	* parse.y (have_extern_spec): Remove declaration.
	(used_extern_spec): Likewise.
	(frob_specs): Eliminate use of used_extern_spec.
	(.hush_warning): Likewise.

2002-07-07  Mark Mitchell  <>

	* (cp/parse.o): Depend on decl.h.
	* cp-tree.h (do_decl_instantiation): Change prototype.
	* parse.y: Include decl.h.
	(parse_decl_instantiation): New function.
	(explicit_instantiation): Use it.
	* pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR

2002-07-07  Roger Sayle  <>

	* error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
	constructor and destructor tests when passed a TEMPLATE_DECL.

2002-07-05  Jason Merrill  <>

	* cvt.c (cp_convert_to_pointer): Call force_fit_type for null

	PR optimization/7145
	* tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.

2002-07-05  Nathan Sidwell  <>

	Repair damage on weak-impared targets caused by my previous patch.
	* cp-tree.h (import_export_tinfo): Add parameter.
	* decl2.c (import_export_tinfo): Add parameter, post adjust
	* rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by

2002-07-03  Kriang Lerdsuwanakij  <>

	PR c++/6944
	* init.c (build_aggr_init): Remove qualifiers of init before calling
	(build_vec_init): Flatten multi-dimensional array during cleanup.
	(build_vec_delete_1): Abort if the type of each element is array.

2002-07-03  Graham Stott  <>

	* pt.c (instantiate_class_template): Fix typo.

2002-07-02  Kriang Lerdsuwanakij  <>

	* typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
	by CVS conflict in my last patch.

2002-07-02  Kriang Lerdsuwanakij  <>

	PR c++/6716
	* pt.c (can_complete_type_without_circularity): New function.
	(instantiate_class_template): Use it.
	* typeck2.c (cxx_incomplete_type_diagnostic): Improve error
	message due to incomplete fields.

2002-07-01  Mark Mitchell  <>

	PR c++/7112
	* mangle.c (write_expression): Add mangling for sizeof when
	applied to a type.
	* operators.def: Remove stale comment.

2002-06-30  Nathan Sidwell  <>

	* cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
	(tinfo_decl_type): Replace with ...
	(type_info_ptr_type): ... this.
	(import_export_tinfo): Declare.
	(tinfo_decl_p): Rename to ...
	(unemitted_tinfo_decl_p): ... this.
	* decl2.c (import_export_decl): Break out tinfo handling into ...
	(import_export_tinfo): ... here. New function.
	(finish_file): Adjust.
	* rtti.c (TINFO_REAL_NAME): New macro.
	(init_rtti_processing): Create the tinfo types.
	(get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
	(get_tinfo_decl): Adjust.
	(get_tinfo_ptr): New function.
	(get_type_id): Use it.
	(tinfo_base_init): Create vtable decl here, if it doesn't exist.
	(ptr_initializer): Use get_tinfo_ptr.
	(ptm_initializer): Likewise.
	(synthesize_tinfo_var): Break into ...
	(get_pseudo_ti_init): ... this. Just create the initializer.
	(get_pseudo_ti_desc): .. and this.
	(create_real_tinfo_var): Remove.
	(create_pseudo_type_info): Don't create the vtable decl here.
	(get_vmi_pseudo_type_info): Remove.
	(create_tinfo_types): Adjust.
	(tinfo_decl_p): Rename to ...
	(unemitted_tinfo_decl_p): ... here. Adjust.
	(emit_tinfo_decl): Adjust. Create the initializer.

2002-06-27  Mark Mitchell  <>

	PR c++/6695
	* pt.c (tsubst_friend_class): Substitute into the context of the
	friend before using it.

2002-06-26  Mark Mitchell  <>

	* cp-tree.h (xref_tag): Change prototype.
	(handle_class_head): Likewise.
	(build_x_component_ref): Likewise.
	* decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
	(xref_tag): Take attributes as a separate parameter.
	(xref_tag_from_type): Adjust call to xref_tag.
	* decl2.c (build_expr_from_tree): Adjust call to
	(handle_class_head): Take attributes as a separate parameter.
	* parse.y (parse_xref_tag): New function.
	(parse_handle_class_head): Likewise.
	(primary): Use parse_xref_tag.
	(class_head_decl): Use parse_handle_class_head.
	(class_head_defn): Likewise.
	* rtti.c (init_rtti_processing): Adjust call to xref_tag.
	(build_dynamic_cast_1): Likewise.
	(create_pseudo_type_info): Likewise.
	(emit_support_tinfos): Likewise.
	* typeck.c (build_object_ref): Adjust call to
	(build_x_component_ref): Remove protect parameter.

2002-06-25  Mark Mitchell  <>

	* call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
	* class.c (handle_using_decl): Likewise.
	(instantiate_type): Likewise.
	* cp-tree.h (BASELINK_FUNCTIONS): New macro.
	(xref_basetypes): Change prototype.
	(begin_mem_initializers): New function.
	(get_overloaded_fn): Likewise.
	* decl.c (xref_basetypes): Simplify.
	* error.c (dump_expr): Use BASELINK_FUNCTIONS.
	* init.c (build_offset_ref): Likewise.
	* parse.y (base_init): Use begin_mem_initializers().
	(structsp): Adjust call to xref_basetypes.
	* pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
	(instantiate_class_template): Adjust call to xref_basetypes.
	* semantics.c (begin_mem_initializers): New function.
	* tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
	(really_overlaoded_fn): Likewise.
	(get_overloaded_fn): New function.'
	(get_first_fn): USe BASELINK_FUNCTIONS.

2002-06-24  Mark Mitchell  <>

	* cp-tree.h (SCALAR_TYPE_P): New macro.
	(check_for_out_of_scope_variable): New function.
	(at_class_scope_p): Likewise.
	(finish_fname): Likewise.
	* class.c (finish_struct): Use at_function_scope_p.
	* decl.c (check_for_out_of_scope_variable): New function, split
	out from do_identifier.
	(finish_enum): Use at_function_scope_p.
	* lex.c (do_identifier): Use check_for_out_of_scope_variable.
	* parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
	(primary): Use at_function_scope_p.
	* search.c (at_class_scope_p): New function.
	* semantics.c (finish_fname): Likewise.
	(check_multiple_declarators): Use at_function_scope_p.

2002-06-23  Mark Mitchell  <>

	* parse.y (parse_scoped_id): New function.
	(primary): Use it.
	* cp-tree.h (do_scoped_id): Adjust declaration.
	* lex.c (do_scoped_id): Remove call to yylex.
	* decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
	* typeck2.c (add_exception_specifier): Use tree_cons, rather than
	expanding it inline.

2002-06-23  Matt Thomas  <>

	* decl.c (finish_function): Change "#ifdef VMS_TARGET" to
	"#if VMS_TARGET".

2002-06-21  Kaveh R. Ghazi  <>

	* mangle.c (integer_type_codes): Const-ify.

2002-06-20  Richard Henderson  <>

	PR c++/6747
	* typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
	Call put_var_into_stack.

2002-06-20  Kaveh R. Ghazi  <>

	* spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
	array size calculation.

2002-06-20  Kriang Lerdsuwanakij  <>

	PR c++/6892
	* pt.c (tsubst_expr): Handle FILE_STMT.

2002-06-20  Kriang Lerdsuwanakij  <>

	PR c++/6723
	* pt.c (lookup_template_class): Don't build complete argument of
	BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template

2002-06-19  Akim Demaille  <>

	* parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
	decl.h's TYPENAME.
	* spew.c, lex.c: Adjust.
	* parse.y (explicit_instantiation): Add empty action to override
	the default $$ = $1 where it introduces a type clash.

2002-06-14  Jason Merrill  <>

	* semantics.c (begin_for_stmt): Push the 'for' scope before
	adding the FOR_STMT.

	C++ ABI changes.
	* class.c (build_base_field): Set DECL_PACKED.
	(layout_class_type): Don't use tail padding of PODs.
	* mangle.c (write_unqualified_name): Fix template conversion op

2002-06-16  Richard Henderson  <>

	PR opt/6793
	* tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
	after template instantiation.

2002-06-16  Richard Henderson  <>

	* cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.

2002-06-15  Gabriel Dos Reis  <>

	* cp-tree.h (compiler_error): Remove declaration.
	* lex.c (compiler_error): Remove definition.

2002-06-14  Steve Ellcey  <>

	* g++spec.c (LIBUNWIND): New.
	(lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.

2002-06-13  Jessica Han  <>

	* class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
	(build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
	(build_vbase_offset_vtbl_entries): Likewise.
	* rtti.c (build_headof): Likewise.
	(get_tinfo_decl_dynamic): Likewise.
	(create_pseudo_type_info): Likewise.

2002-06-12  Stan Shebs  <>

	* Remove file, no longer used.
	* mpw-make.sed: Ditto.

2002-06-07  Zack Weinberg  <>

	* decl2.c: Update call to cpp_handle_option.

2002-06-07  H.J. Lu  (

	* decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.

2002-06-06  Gabriel Dos Reis  <>

	* error.c (cp_error_at): Fix typo.

2002-06-04  Gabriel Dos Reis  <>

	* error.c (cp_diagnostic_starter): Adjust call.
	(maybe_print_instantiation_context): Change prototype to take a
	'diagnostic_info *'.
	(print_instantiation_full_context): Likewise.
	(print_instantiation_partial_context): Likewise.
	(cp_diagnostic_starter): Likewise.
	(cp_diagnostic_finalizer): Likewise.
	(cp_print_error_function): Likewise.
	(cp_printer): Take a secondary parameter as a 'text_info *'.
	Remove output_state savings.  Adjust calls.

2002-06-03  Geoffrey Keating  <>

	* pt.c (inline_parm_levels): Mark for GC.

	* mangle.c (start_mangling): Allocate G.substitutions here...
	(init_mangle): ... rather than here.
	(finish_mangling): Clear the varray pointer when done with it.
	* spew.c (yylexstring): Don't use VARRAY_FREE.
	* search.c (bfs_walk): Don't use VARRAY_FREE.
	* decl2.c (pending_statics): Use gengtype to mark.
	(deferred_fns): Likewise.
	(ssdf_decls): Likewise.
	(init_decl2): Delete.
	* decl.c (pop_from_top_level): Don't use VARRAY_FREE.
	(cxx_init_decl_processing): Don't call init_decl2.
	(cxx_pop_function_context): Don't use VARRAY_FREE.
	* cp-tree.h (struct saved_scope): No need for special marking
	of varrays.
	(struct language_function): Likewise.
	(local_classes): Use gengtype to mark.
	(init_decl2): Delete prototype.
	* class.c (init_class_processing): Don't use
	(build_vtbl_initializer): Don't use VARRAY_FREE.

	* decl.c (typename_compare): Don't use same_type_p.

	* decl.c: Include hashtab.h instead of hash.h.
	(typename_hash): Update to use htab_h.
	(typename_compare): Likewise.
	(typename_htab): Use gengtype to mark.
	(build_typename_type): Update to use htab_h.
	* (cp/decl.o): Use HASHTAB_H instead of hash.h.

	* (gt-cp-tree.h): New rule.
	(cp/tree.o): Depend on gt-cp-tree.h.
	* (gtfiles): Add cp/tree.c.
	* tree.c: Include gt-cp-tree.h.
	(list_hash_table): Use gengtype to mark.
	(init_tree): Use gengtype to mark trees.

	* (cp/decl.o): Add debug.h dependency.
	* call.c (struct z_candidate): Use gengtype.
	(convert_class_to_reference): Use build_zc_wrapper.
	(build_type_conversion_1): Likewise.
	(build_over_call): Use WRAPPER_ZC.
	(add_warning): Use build_zc_wrapper.
	* cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
	* cp-tree.h (struct lang_identifier): Use gengtype.
	(struct template_parm_index_s): Likewise.
	(struct ptrmem_cst): Likewise.
	(struct tree_binding): Likewise.
	(struct tree_overload): Likewise.
	(struct tree_srcloc): Likewise.
	(struct tree_wrapper): Likewise.  Also modify to have a pointer
	to struct z_candidate rather than void.
	(enum cp_tree_node_structure_enum): New.
	(union lang_tree_node): New.
	(cxx_mark_tree): Delete prototype.
	(cp_tree_node_structure): New prototype.
	(build_ptr_wrapper): Delete prototype.
	(build_int_wrapper): Delete prototype.
	(build_zc_wrapper): New prototype.
	* decl.c: Include debug.h
	(cxx_mark_tree): Delete.
	(cp_tree_node_structure): New.
	* tree.c (build_ptr_wrapper): Delete.
	(build_int_wrapper): Delete.
	(build_zc_wrapper): New.

	Correct typo.  Patch from

	* semantics.c (current_stmt_tree): Update for change to
	struct language_function.
	(finish_mem_initializers): Likewise.
	* decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
	* cp-tree.h (struct language_function): Rename from
	cp_language_function.  Change all uses.
	(cp_function_chain): Don't need to cast.

	* class.c (duplicate_tag_error): Reset discriminator.
	(check_bases_and_members): Update for data structure changes.
	* cp-tree.h (struct lang_id2): Use gengtype.
	(flagged_type_tree): Likewise.
	(SET_LANG_ID): Use GGC on struct lang_id2.
	(struct cp_language_function): Use gengtype.  Remove field
	(current_vcalls_possible_p): Delete.
	(struct lang_type_header): New.
	(struct lang_type_class): Rename from struct lang_type.  Include
	struct lang_type_header.
	(struct lang_type_ptrmem): New.
	(struct lang_type): New.
	(LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
	(LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
	(TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
	(struct lang_decl_flags): Use gengtype.  Add discriminators.
	(struct lang_decl): Use gengtype.  Add and use discriminators.
	Update the macros that reference moved fields.
	(LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
	(SET_DECL_THUNK_P): Set discriminator too.
	(clear_inline_text_obstack): Delete prototype.
	(finish_inline_definitions): Delete prototype.
	(mark_pending_inlines): Delete prototype.
	(lang_check_failed): New prototype.
	* decl.c (struct named_label_use_list): Use gengtype.
	(struct named_label_list): Likewise.
	(mark_binding_level): Delete.
	(mark_named_label_lists): Delete.
	(push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
	(cxx_init_decl_processing): Use generated marker routine.
	(begin_destructor_body): Delete dead set to
	(mark_lang_function): Delete.
	(mark_cp_function_context): Delete.
	(lang_mark_tree): Use generated marker routines.
	* decl2.c (start_objects): Set discriminator when setting
	* lex.c (retrofit_lang_decl): Set discriminators.
	(copy_lang_type): Update for changes to lang_type structure.
	(cp_make_lang_type): Set discriminator.
	* parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
	* search.c: Include ggc.h.
	* semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
	(finish_inline_definitions): Delete.
	* spew.c (struct token): Use gengtype.
	(struct token_chunk): New.
	(struct unparsed_text): Use gengtype.  Store tokens in chunks.
	(struct feed): Use gengtype.
	(feed_obstack): Delete.
	(feed): Mark as GC root.
	(pending_inlines): Mark as GC root.
	(pending_inlines_tail): Likewise.
	(processing_these_inlines): Likewise.
	(token_obstack): Make static.
	(first_token): Likewise.
	(init_spew): Don't initialize deleted things; use gengtype for roots.
	(clear_inline_text_obstack): Delete.
	(feed_input): Use GC for struct feed.  Update for changes to
	struct unparsed_text.
	(mark_pending_inlines): Delete.
	(next_token): Rename from add_token.  Change all callers.  Update
	for changes to struct unparsed_text.
	(space_for_token): New.
	(remove_last_token): New.
	(alloc_unparsed_text): New.
	(snarf_block): Take an unparsed_text.  Update for changes to struct
	(snarf_method): Update for changes to struct unparsed_text.
	(snarf_defarg): Update for changes to struct unparsed_text.
	* tree.c (lang_check_failed): New.

	* (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
	gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
	(cp/spew.o): Add dependency on gt-<filename>.h.
	(cp/decl2.o): Add dependency on gt-<filename>.h.
	(cp/call.o): Add dependency on gt-<filename>.h.
	(cp/pt.o): Add dependency on gt-<filename>.h.
	(cp/repo.o): Add dependency on gt-<filename>.h.
	(cp/parse.o): Add dependency on gt-<filename>.h.
	* call.c: Use gengtype for roots.
	* (gtfiles): Add cp-tree.h decl.h lex.h call.c
	decl2.c parse.y pt.c repo.c spew.c.
	* cp-tree.h: Use gengtype for roots.
	(struct saved_scope): Use GGC, gengtype.
	(cp_parse_init): Delete prototype.
	(init_pt): Delete prototype.
	* decl.c: Use gengtype for roots.
	(mark_saved_scope): Delete.
	(cxx_init_decl_processing): Don't call deleted initilisation
	(signed_size_zero_node): Delete, unused.
	* decl.h: Use gengtype for roots.
	* decl2.c: Use gengtype for roots.
	* lex.h: Use gengtype for roots.
	* parse.y: Use gengtype for roots.
	(cp_parse_init): Delete.
	* pt.c: Use gengtype for roots.
	(init_pt): Delete.
	* repo.c: Use gengtype for roots.
	* spew.c: Use gengtype for roots.

	* Allow for filename changes.  Add gtype-cp.h.
	(cp/decl.o): Add dependency on gtype-cp.h.
	* decl.c: Remove use of add_deletable_root, use GTY marker instead.
	Include gtype-cp.h.  Allow for filename changes.

	* (cp/gt-decl.h): Generate using gengtype.
	(cp/decl.o): Add cp/gt-decl.h dependency.
	* (gtfiles): New.
	* tree.h: Rename struct binding_level to struct cp_binding_level.
	* decl.c: Rename struct binding_level to struct cp_binding_level.
	Include cp/gt-decl.h.
	(struct cp_binding_level): Use gengtype.
	(make_binding_level): Use GGC on struct cp_binding_level.
	(mark_binding_level): Use gt_ggc_m_cp_binding_level.
	(cxx_init_decl_processing): Mark free_binding_level as

	* decl.c (mark_cp_function_context): Update calling sequence.

	* decl.c (start_function): Don't free 'struct
	(pop_cp_function_context): Likewise.
	(save_function_data): Allocate it using GC.
	* semantics.c (genrtl_start_function): Don't free 'struct

2002-05-31  Matthew Woodcraft  <>

	* lang-specs.h: Use cpp_debug_options.

2002-05-28  Zack Weinberg  <>

	* mangle.c, tree.c: Include real.h.
	* Update dependency lists.

2002-05-25  Neil Booth  <>

	* lex.c: Don't include c-lex.h.
	* parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.

2002-05-23  Neil Booth  <>

	* spew.c (yyungetc, snarf_block): Remove indent_level handling.

2002-05-22  Richard Henderson  <>

	* decl.c (obscure_complex_init): Check for VAR_DECL
	before using DECL_THREAD_LOCAL.

2002-05-22  Richard Henderson  <>

	* decl.c (check_tag_decl): Handle RID_THREAD.
	(obscure_complex_init): Reject run-time init of tls.
	(grokvardecl, grokdeclarator): Handle RID_THREAD.
	* lex.c (reswords): Add __thread.
	(rid_to_yy): Map RID_THREAD to SCSPEC.

2002-05-22  Neil Booth  <>

	* cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
	* cp-tree.h (cxx_post_options): Kill.
	* cp-lex.c (cxx_post_options): Kill.

2002-05-21  Richard Henderson  <>

	* lex.c (rid_to_yy): Add RID_THREAD.

2002-05-21  Alexandre Oliva  <>

	* init.c (build_vec_init): Test for trivial copy-assignment when
	copy-assigning arrays.

2002-05-20  Andreas Jaeger  <>

	* init.c (build_default_init): Remove unused variable.

2002-05-20  Alexandre Oliva  <>

	* call.c (any_strictly_viable): New.
	(build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.

2002-05-19  Kriang Lerdsuwanakij  <>

	* error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.

2002-05-19  Kriang Lerdsuwanakij  <>

	PR c++/186, DR 259
	* pt.c (do_decl_instantiation): Don't complain explicit
	instantiation after explicit specialization.
	(do_type_instantiation): Likewise.

2002-05-19  Alexandre Oliva  <>

	* cp-tree.h (complete_type_or_diagnostic): Changed prototype,
	renamed from...
	(complete_type_or_else): ... this.  Redefined as macro.
	(cxx_incomplete_type_diagnostic): Declare.
	(cxx_incomplete_type_error): Define as macro.
	* init.c (build_delete): Warn about incomplete types other than
	void, and use the built-in operator delete for them.
	* typeck.c (complete_type_or_diagnostic): Renamed from
	complete_type_or_else.  Added warn_only argument, passed to...
	* typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
	warnings or errors depending on new warn_only argument.  Renamed
	(cxx_incomplete_type_error): ... this.  New implementation in
	terms of cxx_incomplete_type_diagnostic.

2002-05-18  Jason Merrill  <>

	PR c++/6611
	* decl2.c (import_export_decl): If we clear

2002-05-15  Kriang Lerdsuwanakij  <>

	PR c++/6620
	* pt.c (verify_class_unification): Don't check if PARM is template
	parameter dependent.  Simplify.
	(unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
	parameter dependent expression.

2002-05-14  Jason Merrill  <>

	* rtti.c (get_tinfo_decl): Don't call comdat_linkage.
	(synthesize_tinfo_var): Take the public decl.
	(create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
	(emit_tinfo_decl): Adjust.  Call import_export_decl.
	* decl2.c (import_export_decl): Simplify tinfo decl handling.

2002-05-14  Alexandre Oliva  <>

	* cp-tree.h (struct lang_type): Added non_zero_init.
	(zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
	* class.c (check_field_decls): Test non_zero_init.
	* cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
	zero-to-NULL conversions.
	* decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
	type that needs zero-initialization without zeros.
	(check_initializer_decl): Compute zero-initializer for types
	that require a non-trivial one.
	* init.c (build_forced_zero_init): New function.
	(build_default_init): Use it.
	* tree.c (zero_init_p): New function.
	* typeck2.c (force_store_init_value): New function.
	(process_init_constructor): Create non-trivial zero-initializers
	for array members and class fields.

2002-05-14  Neil Booth  <>

	* lang-specs.h: Remove redundant -lang-c++.

2002-05-13  Jason Merrill  <>

	* class.c (build_vtbl_ref_1): Use fixed_type_or_null.
	(fixed_type_or_null): See through reference vars.
	(build_base_path): Vtable contents are constant.
	* typeck.c (get_member_function_from_ptrfunc): Likewise.

2002-05-12  Jason Merrill  <>

	* cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
	structs are safe.

2002-05-09  Neil Booth  <>

	* cp-tree.h (flag_ansi): Remove.
	* decl2.c (flag_ansi): Remove.
	(cxx_decode_option): Set flag_iso and flag_undef.

2002-05-09  Jason Merrill  <>

	* typeck.c (get_member_function_from_ptrfunc): Reorganize.
	Use subtraction rather than a bitmask to get the index.
	* cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.

	* pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.

2002-05-07  Neil Booth  <>

	* (decl2.o): Update.
	* cp-tree.h (warn_multichar): Remove.
	* decl2.c: Include c-common.h.
	(warn_multichar): Remove.

2002-05-03  Jason Merrill  <>

	* tree.c (build_cplus_array_type): Only const and volatile get
	special handling.

	* decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.

2002-04-30  Mark Mitchell  <>

	ABI change, returning simple classes from functions.
	* class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if

2002-04-30  Jason Merrill  <>

	PR debug/6436
	* decl.c (grokdeclarator): Don't override TYPE_NAME of an
	anonymous class with a typedef if there are attributes.

2002-04-29  Paul Eggert  <>

	* parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.

2002-04-29  Jakub Jelinek  <>

	PR c++/6477
	* decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
	non-NULL first.

2002-04-29  Mark Mitchell  <>

	PR c++/6492
	* pt.c (tsubst_friend_class): If the friend has an explicit scope,
	enter that scope before name lookup.

	PR c++/6486
	* method.c (do_build_copy_constructor): Avoid building
	cv-qualified reference types.

2002-04-29  Nathan Sidwell  <>

	PR c++/5719
	* decl.c (grok_op_properties): Assignment ops don't have to return
	by value. operator% should.

2002-04-28  Franz Sirl  <>

	PR c/6343
	* decl.c (duplicate_decls): Call merge_weak.

2002-04-26  Richard Henderson  <>

	* parse.y (malloced_yyss, malloced_yyvs): New.
	(yyoverflow): Re-add.  Set them.
	(free_parser_stacks): New.

2002-04-26  Mark Mitchell  <>

	PR c++/6497
	* method.c (do_build_assign_ref): Pass a derivation to
	build_method_call when calling base class assignment operators.

2002-04-26  Richard Henderson  <>

	* parse.y (yyoverflow): Revert.

2002-04-26  Richard Henderson  <>

	PR c/3581
	* parse.y (string): Remove.  Update all uses to use STRING
	instead, and not call combine_strings.
	* rtti.c (tinfo_name): Use fix_string_type.
	* semantics.c (finish_asm_stmt): Don't call combine_strings.
	* spew.c (yylexstring): New.
	(read_token): Use it.

2002-04-25  Richard Henderson  <>

	PR c/2161
	* parse.y (yyoverflow): New.

2002-04-25  Jason Merrill  <>

	PR c++/5607
	* search.c (check_final_overrider): No longer static.
	* class.c (update_vtable_entry_for_fn): Call it.
	* cp-tree.h: Adjust.

2002-04-25  Neil Booth  <>

	* cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
	* cp-tree.h (cxx_set_yydebug): Die.
	* lex.c (YYDEBUG): Get from c-lex.h.
	(cxx_set_yydebug): Remove.
	* parse.y: Include c-lex.h.
	(YYDEBUG): Get from c-lex.h.

2002-04-24  Mark Mitchell  <>

	PR c++/6438.
	* cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs

2002-04-24  Neil Booth  <>

	* cp-tree.h (cp_attribute_table): Rename.
	* decl.c (lang_attribute_table): Remove declaration.
	(cxx_init_decl_processing): Don't set it.
	* tree.c (cp_attribute_table): Rename.

2002-04-24  Jason Merrill  <>

	PR c++/6331
	* method.c (do_build_copy_constructor): Use cp_build_qualified_type.
	* typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
	The pedwarn for array assignment is now unconditional.
	* tree.c (build_cplus_array_type_1): Still process simple array types
	normally in templates.

	PR c++/6395
	* decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
	stuff for comdats.

2002-04-23  Jakub Jelinek  <>

	* parse.y (check_class_key): Allow KEY to be union/enum/struct/class
	node with attributes.

2002-2-23  David O'Brien  <>

	Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.

2002-04-23  Mark Mitchell  <>

	PR c++/6256:
	* pt.c (tsubst_friend_class): Handle templates with explicit
	nested names.

	PR c++/6331:
	* typeck.c (merge_types): Remember the cv-qualification of pointer
	types when merging them.

2002-04-20  Neil Booth  <>

	* cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
	cxx_mark_function_context): New.
	* decl.c (push_cp_function_context, pop_cp_function_context,
	mark_cp_function_context): Rename for consistency.
	(cxx_init_decl_processing): Don't set old hooks.

2002-04-19  Neil Booth  <>

	* call.c (convert_type_from_ellipsis): Rename, update.
	* cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
	* cp-tree.h (convert_type_from_ellipsis): Rename.
	* decl.c (cxx_init_decl_processing): Don't set hook.

2002-04-18  Neil Booth  <>

	* call.c (build_new_method_call): Update.
	* cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
	* cp-tree.h (cxx_incomplete_type_error): New.
	* decl.c (grokdeclarator, grokparms): Update.
	* decl2.c (check_classfn): Update.
	* pt.c (tsubst): Update.
	* typeck.c (complete_type_or_else, expr_sizeof,
	decay_conversion): Update.
	* typeck2.c (incomplete_type_error): Rename.
	(add_exception_specifier): Update.

2002-04-18  Jason Merrill  <>

	PR c++/5658
	* search.c (setup_class_bindings): A class template qualifies as a
	type binding.

2002-04-17  Jakub Jelinek  <>

	PR c++/6316
	* decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
	before expanding.

2002-04-16  Mark Mitchell  <>

	* init.c (begin_init_stmts): Remove commented out code.
	(finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
	* semantics.c (begin_gobal_stmt_expr): Adjust call to

2002-04-15  Mark Mitchell  <>

	* decl.c (register_dtor_fn): Pass the address of dso_handle, not
	dso_handle itself, to __cxa_atexit.

2002-04-15  Gabriel Dos Reis  <>

	* error.c (cxx_print_error_function): Adjust call to macros.

2002-04-14  Jakub Jelinek  <>

	* class.c (layout_virtual_bases): Do all dsize computation on trees.

2002-04-14  Jason Merrill  <>

	* typeck.c (get_member_function_from_ptrfunc): Don't do
	gratuitious division and multiplication on
	ptrmemfunc_vbit_in_delta targets.

2002-04-12  Mark Mitchell  <>

	PR c++/5373.
	* semantics.c (finish_expr_stmt): Remember the type of the
	expression before any conversions are performed.

2002-04-12  Mark Mitchell  <>

	PR c++/5189.
	* call.c (add_template_candidate_real): Do not treat member
	templates as copy constructors.

2002-04-12  Mark Mitchell  <>

	* decl.c (duplicate_decls): Do not copy the RTL for a variable
	declaration if the old variable had an incomplete type and the new
	variable does not.
	(complete_vars): Do not call layout_decl for completed variables.

2002-04-12  Richard Sandiford  <>

	* decl.c (duplicate_decls): Don't try to unify an implicit typedef
	with an explicit one.
	(follow_tag_typedef): New.
	(lookup_tag): Use it to extract the tag of an explicit typedef.
	(xref_tag): Likewise.

2002-04-11  Andrew Haley  <>

	* typeck.c (type_after_usual_arithmetic_conversions):
	If two types have the same variant, return immediately.
	When two floating-point operands are the same precision:
	  convert to float if one of the operands is float;
	  if neither operand is one of the standard types, return the type
	  of the first operand.

2002-04-10  Nathan Sidwell  <>

	PR c++/5507
	* decl.c (make_typename_type): Remove implicit typenameness.

2002-04-09  Jason Merrill  <>

	PR optimization/6189
	* semantics.c (genrtl_start_function): Don't free
	DECL_SAVED_FUNCTION_DATA for inline functions.

	* init.c (build_member_call): For now, don't convert to
	intermediate base if it would cause an error.

2002-04-08  Paolo Carlini  <>

	* parse.y (namespace_qualifier, maybe_identifier,
	begin_explicit_instantiation, end_explicit_instantiation,
	apparent_template_type, .finish_template_type,
	do_id, maybe_init, defarg_again, component_decl_1):
	Add ending ';', in accordance with POSIX.

2002-04-06  Mark Mitchell  <>

	PR c++/5571
	* class.c (layout_class_type): Remember incomplete static
	(finish_struct_1): Call complete_vars, not
	* cp-tree.h (hack_incomplete_structures): Rename to ...
	(complete_vars): ... this.
	(struct saved_scope): Remove incomplete.
	(namespace_scope_incomplete): Remove.
	* decl.c (struct binding_level): Remove incomplete.
	(incomplete_vars): New variable.
	(mark_binding_level): Don't mark incomplete.
	(print_binding_level): Don't print it.
	(mark_saved_scope): Don't mark incomplete.
	(pushdecl): Use maybe_register_incopmlete_var.
	(cxx_init_decl_processing): Register incomplete_vars for GC.
	(start_decl_1): Clarify error message.
	(hack_incomplete_vars): Remove.
	(maybe_register_incomplete_var): New function.
	(complete_vars): Likewise.

2002-04-06  Jason Merrill  <>

	PR c++/4934
	* error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
	set before checking it.

	PR c++/525
	* init.c (build_member_call): Use build_scoped_ref.
	(resolve_offset_ref): Likewise.
	* call.c (build_scoped_method_call): Likewise.
	* tree.c (maybe_dummy_object): Kludge around current_class_type being
	* typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
	* cp-tree.h: Adjust.

	* init.c (push_base_cleanups): Just use build_scoped_method_call.

	PR c++/6179
	* method.c (implicitly_declare_fn): Pass unqualified type to

2002-04-04  Neil Booth  <>

	* cvt.c: Update comment.
	* init.c (expand_cleanup_for_base): Update.
	* semantics.c (finish_parenthesized_expr): Update.
	* typeck.c (cp_truthvalue_conversion): Update.

2002-04-04  Jason Merrill  <>

	* semantics.c (finish_eh_cleanup): New fn.
	* cp-tree.h: Add prototype.
	* init.c (perform_member_init, expand_cleanup_for_base): Use
	* cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
	* cp-tree.h: Remove references.
	* decl.c (begin_constructor_body, end_constructor_body): Likewise.
	* dump.c (cp_dump_tree): Likewise.
	* pt.c (tsubst_expr): Likewise.
	* semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
	(cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
	* tree.c (cp_statement_code_p): Likewise.

	* init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.

	PR c++/5636
	* semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
	cleanup for nrv.

	PR c++/5104
	* typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
	[METHOD_TYPE]: Use same code as FUNCTION_TYPE.

2002-04-03  Richard Henderson  <>

	* cp-lang.c (cxx_warn_unused_global_decl): New.

2002-04-03  Neil Booth  <>

	* cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
	* tree.c (init_tree): Don't set hook.

2002-04-03  Roger Sayle  <>

	PR c++/5998:
	* decl.c (duplicate_decls): Don't mess with assembler names when
	redeclaring builtin functions as static.

2002-04-01  Neil Booth  <>

	* call.c (build_addr_func): Update.
	* class.c (resolve_address_of_overloaded_function): Update.
	* cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
	* cp-tree.h (cxx_mark_addressable): New.
	* decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
	* decl2.c (build_cleanup): Update.
	* except.c (build_throw): Update.
	* init.c (resolve_offset_ref): Update.
	* pt.c (convert_nontype_argument): Update.
	* semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
	* typeck.c (decay_conversion, build_array_ref, build_unary_op,
	unary_complex_lvalue): Update.
	(mark_addressable): Rename.

2002-04-01  Roger Sayle  <>

	PR c++/5998:
	* decl.c (duplicate_decls):  Overwrite the RTL when (and only
	when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
	but follow the SET_DECL_RTL idiom used elsewhere in the function.

2002-04-01  Neil Booth  <>

	* decl.c (grokdeclarator): Update.
	* mangle.c (write_integer_cst): Update.
	* typeck.c (build_binary_op): Update.

2002-03-31  Neil Booth  <>

	* cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
	* lex.c (cxx_init): Don't set hook.

2002-03-31  Neil Booth  <>

	* (error.o): Update.
	* cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
	* cp-tree.h (struct diagnostic_context): Predeclare.
	(cxx_print_error_function): New.
	* error.c: Include langhooks-def.h.
	(lang_print_error_function): Rename.  Update.
	(init_error): Don't set hook.

2002-03-29  Neil Booth  <>

	* cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
	* decl.c (finish_enum): Similarly.
	* error.c (dump_type): Similarly.
	* lex.c (cxx_init): Similarly.
	* mangle.c (write_builtin_type): Similarly.
	* typeck.c (comptypes): Similarly.

2002-03-28  Roger Sayle  <>

	PR c++/5998:
	* decl.c (cxx_init_decl_processing): Re-enable built-in functions
	in the g++ front-end.
	(duplicate_decl): Allow redefinition of anticipated built-ins.
	Fix inlining problem by over-writing the old DECL_RTL.
	(lookup_namespace_name): Fail to find an identifier in the
	specified namespace if its still anticipated.
	(builtin_function_1): New function split out from builtin_function
	to create a builtin in the current namespace with given context.
	(builtin_function): Call builtin_function_1 to define the
	appropriate builtins in both the std and global namespaces.
	(select_decl): Don't test for anticipated decls here.
	(unqualified_namespace_lookup): Instead ignore them whilst
	searching through scopes and namespaces.
	* decl2.c (do_nonmember_using_decl): If a using declaration
	specifies an anticipated built-in function, mark it as no longer
	anticipated in that scope.
	(ambiguous_decl):  Avoid resolving to an anticipated decl.
	* lex.c (do_scoped_id): Fail to find an identifier in the global
	namespace if its still anticipated.

2002-03-29  Neil Booth  <>

	* cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
	* cp-tree.h (cp_make_lang_type): Rename.
	* lex.c (cp_make_lang_type): Rename.
	(make_aggr_type): Update.
	* tree.c (init_tree): Don't set make_lang_type_fn.

2002-03-29  Jakub Jelinek  <>

	PR c++/6073
	* class.c (finish_struct_1): Update static field's DECL_MODE even
	if its type is a variant of t.

2002-03-27  Neil Booth  <>

	* cp-tree.h (cxx_insert_default_attributes): New.
	* decl.c (insert_default_attributes): Rename.

2002-03-27  Mark Mitchell  <>

	PR c++/4884
	* call.c (build_op_delete_call): Allow for the fact the placement
	may be a COMPOUND_EXPR.

2002-03-27  Neil Booth  <>

	* cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
	* cp-tree.h (init_cplus_expand): Remove.
	(cxx_expand_expr): New.
	* expr.c (cplus_expand_expr): Rename cxx_expand_expr,
	fix prototype.
	(init_cplus_expand): Remove.
	* lex.c (cxx_init): Don't call init_cplus_expand.

2002-03-26  Mark Mitchell  <>

	PR c++/4884.
	* init.c (build_new_1): Allow for the fact the result of
	build_function_call may be a COMPOUND_EXPR.

2002-03-26  Nathan Sidwell  <>

	PR c++/5682
	* cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
	(dfs_skip_nonprimary_vbases_unmarkedp): Remove.
	(dfs_skip_nonprimary_vbases_markedp): Remove.
	* search.c (get_shared_vbase_if_not_primary): Remove.
	(dfs_skip_nonprimary_vbases_unmarkedp): Remove.
	(dfs_skip_nonprimary_vbases_markedp): Remove.
	(dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
	(dfs_marked_real_bases_queue_p): Likewise.

2002-03-26  Neil Booth  <>

	* cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
	* cp-tree.h (cxx_mark_tree): New.
	* decl.c (lang_mark_tree): Rename cxx_mark_tree.

2002-03-25  Neil Booth  <>

	* cp-tree.h (cxx_maybe_build_cleanup): New.
	* decl.c (destroy_local_var, hack_incomplete_structures): Update.
	(maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
	* tree.c (build_target_expr): Update.
	* cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.

2002-03-24  Neil Booth  <>

	* decl2.c (cxx_decode_option): Handle -E.
	* lang-specs.h (default_compilers): Preprocess with cc1plus.
	* lex.c (cxx_init): Exit quickly if c_common_init returns NULL.

2002-03-23  Jakub Jelinek  <>

	PR c++/6037
	* decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.

2002-03-23  Gabriel Dos Reis  <>

	* error.c (dump_type): Be careful about implicit typenames.

2002-03-21  Gabriel Dos Reis  <>

	PR C++/3656
	* semantics.c (finish_base_specifier): Handle erronous base

2002-03-22  Zack Weinberg  <>

	* error.c: Always use REAL_VALUE_TO_DECIMAL; don't test

2002-03-22  Jeff Knaggs  <>

	* typeck.c (get_member_function_from_ptrfunc): Scale idx down to
	an index into the vtable_entry array regardless of

2002-03-21  Aldy Hernandez  <>

	* tree.c (cp_cannot_inline_tree_fn): Same.

2002-03-21  Neil Booth  <>

	* cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
	insert_block, getdecls, global_bindings_p): New.

2002-03-20  Nathan Sidwell  <>

	PR c++/4361
	* mangle.c (struct globals) Add internal_mangling_p member.
	(write_template_param): Do internal mangling, if needed.
	(mangle_conv_op_name_for_type): Request internal mangling.

2002-03-20  Jason Merrill  <>

	PR c++/2136
	* init.c (build_delete): Check access for a member op delete here.
	* decl2.c (delete_sanity): Not here.

2002-03-19  Jason Merrill  <>

	PR c++/5118
	* class.c (get_vfield_name): Use the constructor_name.

2002-03-20  Neil Booth  <>

	* cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
	* cp-tree.h (lang_printable_name): Rename.
	* error.c (lang_decl_name): Use new hook.
	* lex.c (cxx_init): Remove old hook.
	* pt.c (tsubst_decl): Use new hook.
	* tree.c (lang_printable_name): Rename.

2002-03-18  Eric Botcazou  <>

	PR c++/3882
	* pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
	(tsubst_expr) [DECL_STMT]: And substitute the initializer
	only after recording the declaration.

2002-03-18  Jason Merrill  <>

	PR c++/2039
	* init.c (resolve_offset_ref): Hand off to build_component_ref.

	PR c++/4222, c++/5995
	* call.c (build_over_call): Fix empty class logic.

	PR c++/3870
	* cp-tree.h (struct saved_scope): Add last_parms field.
	* decl.c (maybe_push_to_top_level): Save last_function_parms.
	(pop_from_top_level): Restore it.

	PR c++/4377
	* mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip

	PR c++/4003
	* pt.c (tsubst_friend_function): Use decl_namespace_context.

	PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
	* class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
	type with a nontrivial destructor.

2002-03-17  Jason Merrill  <>

	PR c++/4460
	* class.c (build_base_path): Virtual base layout is fixed in
	in-charge [cd]tors.

2002-03-17  Neil Booth  <>

	* cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
	* parse.y (yyparse): Remove macro.

2002-03-17  Jason Merrill  <>

	PR c++/5757
	* init.c (build_new_1): Pass the right pointer to op delete.

2002-03-16  Nathan Sidwell  <>

	PR c++/4361
	* cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
	conversion operators go.
	(struct lang_decl_flags): Add template_conv_p and unused
	* call.c (build_user_type_conversion_1): Don't check second type
	conversion of overload set first.
	* class.c (add_method): Make sure templated conversion operators
	all end up on slot 2.
	* lex.c (do_identifier): A conversion operator token might be
	satisfied by a templated conversion operator.
	* pt.c (check_explicit_specialization): Use
	(template_parm_this_level_p): New function.
	(push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
	* search.c (lookup_fnfields_1): Template conversions will be on
	the first slot.
	* typeck.c (build_component_ref): Preserve the type of an
	conversion operator name on the overload type.
	(build_x_function_call): Retrieve the conversion operator name.

2002-03-15  Richard Henderson  <>

	* init.c (build_new_1): Use size_binop instead of cp_build_binary_op.

2002-03-15  Mark Mitchell  <>

	* cp-tree.h (CLEANUP_DECL): Remove.
	(CLEANUP_EXPR): Likewise.
	* decl.c (destroy_local_var): Simplify.
	(maybe_build_cleanup): Tidy.
	* dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
	* semantics.c (cp_expand_stmt): Likewise.
	* cp/tree.c (cp_statement_code_p): Likewise.

2002-03-15  Jason Merrill  <>

	PR c++/5857
	* decl.c (duplicate_decls): Use merge_types instead of common_type.
	* typeck.c (common_type): Just hand off to
	type_after_usual_arithmetic_conversions and
	(merge_types): New fn.
	(commonparms): Use it instead of common_type.
	(type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
	(composite_pointer_type): Also handle attributes.
	* cp-tree.h: Declare merge_types.

	* decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
	* decl2.c (maybe_make_one_only): Also mark the decl as needed.

2002-03-14  Richard Henderson  <>

	* decl.c: Include c-pragma.h.
	(start_decl, start_function): Invoke maybe_apply_pragma_weak.
	* Update dependencies.

2002-03-14  Jakub Jelinek  <>

	PR c++/5908
	* call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
	* cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.

2002-03-12  Richard Sandiford  <>

	* mangle.c (write_builtin_type): Handle 128-bit integers even if
	they are not a standard integer type.

2002-03-12  Richard Sandiford  <>

	* cp-tree.h (init_init_processing): Remove declaration.
	* init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
	* decl.c (cxx_init_decl_processing): Don't call init_init_processing.

2002-03-12  Kaveh R. Ghazi  <>

	* cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
	* decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
	* lex.c (cplus_tree_code_type, cplus_tree_code_length,
	cplus_tree_code_name): Delete.
	(cxx_init): Don't call add_c_tree_codes, instead set
	lang_unsafe_for_reeval.  Don't try to copy into the various
	tree_code arrays.

2002-03-12  Nathan Sidwell  <>

	PR c++/5659
	* decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
	* decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for

2002-03-11  Nathan Sidwell  <>

	Revert 2001-03-26  Nathan Sidwell  <>,
	DR209 is now not a defect.
	* cp-tree.h (skip_type_access_control): Remove.
	* decl.c (grokdeclarator): Do type access control for friend
	* semantics.c (decl_type_access_control): Don't reset
	(save_type_access_control): Always save the lookups.
	(skip_type_access_control): Remove.
	(finish_class_definition): Don't change type_lookups.

2002-03-11  Nathan Sidwell  <>

	Revert 2000-12-01  Nathan Sidwell  <>,
	It is incorrect.
	* typeck.c (build_static_cast): Compare non-qualified types
	with pointer to member conversions.

2002-03-11  Dan Nicolaescu  <>
	    Daniel Berlin  <>

	* cp-lang.c (ok_to_generate_alias_set_for_type): New function.
	(cxx_get_alias_set): Use it.

2002-03-10  Kaveh R. Ghazi  <>

	* cp-tree.h (stabilize_expr): Prototype.

2002-03-08  Craig Rodrigues  <>

	* cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
	conditional return void.

2002-03-08  Neil Booth  <>

	* cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
	* cp-tree.h (cxx_unsave): New.
	* tree.c (cp_unsave): Rename cxx_unsave, update prototype.
	(init_tree): Update.

2002-03-03  Kaveh R. Ghazi  <>

	* decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
	explicit sizeof/sizeof.
	* decl2.c (cxx_decode_option): Likewise.
	* lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.

2002-03-02  Nathan Sidwell  <>

	PR c++/775
	* decl.c (lookup_tag): Only reject enum/class mismatch, not
	class/union mismatch.
	* parse.y (check_class_key): New function.
	(structsp): Call it.

2002-03-01  Michael Matz  <>

	* typeck.c (cp_pointer_int_sum): Complete inner type which is
	used later by size_in_bytes().

2002-03-01  Phil Edwards  <>

	* cp-tree.h:  Require __GNUC__ to be #defined.
	(build_init):  Add missing prototype.

2002-03-01  Jason Merrill  <>

	* except.c: Don't include decl.h or obstack.h.  Do include
	(build_throw): Destroy temporaries from the thrown
	expression before calling __cxa_throw.  Construct a thrown
	temporary directly into the exception object.
	(stabilize_throw_expr): New function.
	(wrap_cleanups_r): New function.
	* tree.c (stabilize_expr): New function.
	* init.c (build_init): New function.
	* (cp/except.o): Adjust .h deps.

2002-02-28  Jason Merrill  <>

	* search.c (lookup_base_r): Don't clear is_non_public just because
	we found a friendly scope.

	* decl.c (finish_function): Only warn about missing return
	statement with -Wreturn-type.

2002-02-28  Neil Booth  <>

	* class.c (build_clone): Update.
	* cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
	* cp-tree.h (cxx_dup_lang_specific_decl): New.
	* lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
	(copy_decl): Update.
	* method.c (make_thunk): Update.

2002-02-27  Zack Weinberg  <>

	* decl2.c: Delete traditional-mode-related code copied from
	the C front end but not used, or used only to permit the
	compiler to link.

2002-02-24 Craig Rodrigues  <>

	PR c++/4093
	* cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
	to void.

2002-02-22  Jakub Jelinek  <>

	PR other/5746
	* semantics.c (finish_switch_cond): Don't call get_unwidened
	if error_mark_node.

2002-02-22  Nathan Sidwell  <>

	PR c++/2645, DR 295
	* cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
	(make_typename_type): Use tsubst_flags_t.
	* decl.c (make_typename_type): Adjust. Return non-artificial
	TYPE_DECLs, if required.
	(grokdeclarator): Simplify CVR qualification handling. Allow bad
	qualifiers on typedef types.
	* decl2.c (handle_class_head): Adjust make_typename_type call.
	* parse.y (nested_name_specifier): Likewise.
	(typename_sub0): Likewise.
	(typename_sub1): Likewise.
	* pt.c (convert_template_argument): Adjust make_typename_type
	return value.
	(tsubst): Adjust cp_build_qualified_type_real calls.
	(check_cv_quals_for_unify): Cope with allowing bad qualifications
	on template type parms.
	(instantiate_decl): Recheck substitutions to give warnings on bad
	* tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.

2002-02-21  Aldy Hernandez  <>

	* cp/decl.c (duplicate_decls): Merge always_inline attribute.

	* cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0

2002-02-20  Jakub Jelinek  <>

	* typeck.c (cp_pointer_int_sum): Renamed from
	pointer_int_sum, call pointer_int_sum.

2002-02-20  Jakub Jelinek  <>

	* decl.c (duplicate_decls): Return 0 if issued error about

2002-02-19  Jason Merrill  <>

	ABI change: Mangle `void (A::*)() const' as
	M1AKFvvE, not MK1AFvvE.
	* mangle.c (write_function_type): Write cv-quals for member
	function type here.
	(write_pointer_to_member_type): Not here.

2002-02-18  Jason Merrill  <>

	* pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
	(do_decl_instantiation): Likewise.

2002-02-17  Craig Rodrigues  <>

	PR c++/5685
	* decl.c (duplicate_decls): Make warning unconditional
	if duplicate default argument declarations are present.

2002-02-17  Jakub Jelinek  <>

	* typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit

2002-02-15  Nathan Sidwell  <>

	* decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
	remove incorrect comment. Move #if 0'd code to common path. Use
	IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.

2002-02-13  Jason Merrill  <>

	* decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
	(finish_function): Don't warn if current_function_returns_null.

	* typeck2.c (digest_init): Do handle values of vector type.

	* typeck2.c (digest_init, process_init_constructor): Treat vectors
	like arrays.

2002-02-11  Jason Merrill  <>

	* parse.y (reserved_declspecs): Don't handle attributes.
	(reserved_typespecquals): Handle them here.
	* (parse.c): Adjust expected conflicts.

2002-02-08  Jakub Jelinek  <>

	* parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
	instead of compstmt.
	(compstmt_or_stmtexpr): Renamed from compstmt.
	(compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.

2002-02-07  Nathan Sidwell  <>

	Rename instantiate_type_flags to tsubst_flags_t & expand use.
	* cp-tree.h (instantiate_type_flags): Rename to ...
	(tsubst_flags_t): ... here. Rename itf_complain to tf_error,
	add tf_warning flag.
	(instantiate_type): Adjust prototype.
	(tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
	do_type_instantiation, cp_build_qualified_type_real): Likewise.
	cp_build_qualified_type: Adjust.
	* class.c (instantiate_type): Adjust parameter. Rename itf_* to
	* call.c (standard_conversion): Rename itf_* to tf_*.
	(reference_binding): Likewise.
	(convert_like_real): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	(convert_to_reference): Likewise.
	* decl.c (lookup_namespace_name): Use tf_* flags.
	(make_typename_type): Likewise.
	(grokdeclarator): Likewise.
	* pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
	(coerce_template_template_parms, convert_template_argument,
	coerce_template_parms, maybe_get_template_decl_from_type_decl,
	lookup_template_class, tsubst_friend_function, tsubst_friend_class,
	instantiate_class_template, tsubst_template_arg_vector,
	tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
	tsubst_decl, tsubst_arg_types, tsubst_function_type,
	tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
	instantiate_template, fn_type_unification,
	resolve_overloaded_unification, verify_class_unification,
	unify, get_bindings_real, do_type_instantiation,
	regenerate_decl_from_template, instantiate_decl,
	tsubst_initializer_list, tsubst_enum,
	invalid_nontype_parm_type_p): Likewise.
	* tree.c (cp_build_qualified_type_real): Likewise.
	* typeck.c (build_binary_op): Rename itf_* to tf_*.
	(build_ptrmemfunc): Likewise.
	(convert_for_assignment): Likewise.

2002-02-07  Nathan Sidwell  <>

	PR c++/109
	* decl.c (grokdeclarator): Allow friend declarations from
	dependent types.
	* decl2.c (handle_class_head): Don't push into template parm contexts.
	* pt.c (push_template_decl_real): Template parm contexts are never
	being defined.

2002-02-05  Alexandre Oliva  <>

	* class.c: Include target.h.
	(check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
	bit-field layout.
	* Adjust deps.

2002-02-05  Jason Merrill  <>

	* error.c (dump_type): Be more helpful about VECTOR_TYPE.

2002-02-04  Jakub Jelinek  <>

	* semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
	(finish_switch_cond): Set SWITCH_TYPE.

2002-02-04  Richard Henderson  <>

	* method.c (use_thunk): Always initialize the block tree.  Reindent.
	* semantics.c (expand_body): Emit thunks after function, not before.

2002-02-04  Jason Merrill  <>

	* decl.c (start_function): Call cplus_decl_attributes immediately
	after grokdeclarator.

	* decl.c (start_function): Combine DECL_RESULT handling code.

2002-02-03  Jason Merrill  <>

	* xref.c: Remove.
	* (CXX_OBJS): Remove cp/xref.o
	(cp/xref.o): Remove dependencies.
	* class.c (finish_struct_1, check_methods): Don't call xref fns.
	(finish_struct_1): Likewise.
	* friend.c (make_friend_class): Likewise.
	* lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
	* spew.c (read_process_identifier): Likewise.

2002-02-01  Jason Merrill  <>

	PR c++/4872
	* decl.c (finish_function): Warn about a non-void function with
	no return statement and no abnormal exit.
	* cp-tree.h (struct cp_language_function): Add returns_abnormally.
	(current_function_returns_abnormally): New macro.
	* call.c (build_call): Set it.

	* typeck.c (build_component_ref): Always complain about offsetof
	constructs on non-PODs.  Only make it an error for members of
	virtual bases.

	* error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
	(dump_function_decl): Always dump parms.

	* decl2.c (finish_static_data_member_decl): Complain about a local
	class with a static data member.

	PR c++/4286
	* search.c (lookup_field_1): Don't xref a static data member
	just because we looked it up.

2002-01-31  Jason Merrill  <>

	* (parse.c): Handle .output file.

	PR c++/3395
	* decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
	* semantics.c (finish_class_definition): Adjust.

	Allow attributes in parms and casts.
	* parse.y (named_parm): Don't strip attrs.
	(declmods): Remove 'attributes' production.
	(nonempty_cv_qualifiers): Accept attributes.
	(ATTRIBUTE): Give precedence.
	* decl.c (groktypename): Handle attributes.
	(grokparms): Likewise.

2002-01-29  Jakub Jelinek  <>

	* decl2.c (cxx_decode_option): Pass 0 as last argument to
	* lang-specs.h: Use cpp_unique_options instead of cpp_options
	when used together with cc1_options.

2002-01-29  Nathan Sidwell  <>

	PR c++/5132
	* typeck2.c (digest_init): Make sure non-array core type is
	* decl2.c (reparse_absdcl_as_casts): Just store the type in the
	constructor, rather than build a new one.
	(build_expr_from_tree, CONSTRUCTOR case): Be careful with the
	PURPOSE of constructor elts.

2002-01-23  Zack Weinberg  <>

	* (parse.c): Adjust expected number of
	shift-reduce conflicts.
	(decl.o): Depend on diagnostic.h.
	* decl.c: Include diagnostic.h.
	(grokdeclarator): Check for null pointer.
	(finish_function): Don't abort when
	current_binding_level->parm_flag != 1, if errors have
	occurred; throw away the statement tree and extra binding
	levels, and continue.
	* lex.c (note_list_got_semicolon): Check for null pointer.
	* method.c (hack_identifier): Just return error_mark_node if
	value is error_mark_node.
	* parse.y (primary: TYPEID(type_id)): No need to use
	(handler_seq): Accept an empty list of catch clauses and
	generate a fake handler block to avoid later crashes.
	(ansi_raise_identifier): Accept the error token too.
	* semantics.c (begin_class_definition,
	finish_class_definition): Check for error_mark_node.

2002-01-23  Zack Weinberg  <>

	* typeck2.c (friendly_abort): Delete definition.
	* cp-tree.h (friendly_abort): Don't prototype.
	(my_friendly_assert): Use fancy_abort.

2002-01-23  Craig Rodrigues  <>

	* cp-tree.h (my_friendly_abort): Remove.

2002-01-23  Jakub Jelinek  <>

	* spew.c (pending_inlines, pending_inlines_tail,
	processing_these_inlines): Make static.
	(mark_pending_inlines): Remove static.
	(begin_parsing_inclass_inline): If in function, save pi
	for GC to cp_function_chain->unparsed_inlines instead.
	(process_next_inline): Likewise.
	* cp-tree.h (struct cp_language_function): Add unparsed_inlines.
	(mark_pending_inlines): Add prototype.
	* decl.c (spew_debug): Remove unused extern.
	(mark_lang_function): Call mark_pending_inlines.

2002-01-23  Craig Rodrigues  <>

	* call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
	init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
	semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
	Change my_fancy_abort() to abort().

2002-01-23  Jason Merrill  <>

	PR c++/5453
	* class.c (fixed_type_or_null): Fix thinko.

	PR c++/3331
	* init.c (resolve_offset_ref): Use build_indirect_ref.

	* decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.

2002-01-22  Jason Merrill  <>

	* parse.y (function_body): Suppress the block for the outermost
	curly braces.
	* decl.c (pushdecl): Don't try to skip it.
	(begin_function_body): Keep the block we create, not the next one.
	* init.c (emit_base_init): Don't mess with keep_next_level.

	* class.c (build_base_path): Tweak formatting.

2002-01-19  Nathan Sidwell  <>

	Fix regression introduced with patch for c++/775
	* parse.y (class_head_defn): Check for template specializations
	with a different class-key.

2002-01-17  Jason Merrill  <>

	* decl.c (begin_constructor_body, begin_destructor_body): New fns.
	(begin_function_body): Call them and keep_next_level.
	* init.c (emit_base_init): Call keep_next_level.
	* semantics.c (setup_vtbl_ptr): Lose.
	* cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
	(vtbls_set_up_p): Lose.
	* pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
	* method.c (do_build_copy_constructor): Likewise.
	(synthesize_method): Call finish_mem_initializers.
	* parse.y (nodecls): Likewise.

	* error.c (dump_type_suffix): Print the exception specs before
	(dump_function_decl): Here, too.

	* cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.

2002-01-10  Ira Ruben	<>

	PR c++/907
	* decl.c (start_method): Handle attrlist.

2002-01-10  Jakub Jelinek  <>

	* decl2.c (max_tinst_depth): Increase default limit to 500.

2002-01-10  Graham Stott  <>

	* spew.c (YYCHAR): Uppercase macro parameter and add
	(YYCODE): Likewise.
	(NAME): Uppercase macro parameter.

2002-01-09  Graham Stott  <>

	* decl.h (grokdeclarator): Wrap long line.

	* semantics.c (FINISH_COND): Uppercase macro paramaters and
	add parenthesis.

2002-01-08  Graham Stott  <>

	* xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
	(PALLOC): Uppercase macro parameter and whitespace.
	(SALLOC): Uppercase macro parameter.
	(SFREE): Uppercase macros parameter, add parenthese and
	(STREQL): Uppercase macro parameter and whitespace.
	(STRNEQ): Likewise.
	(STRLSS): Likewise.
	(STRLEQ): Likewise.
	(STRGTR): Likewise.
	(STRGEQ): Likewise.

	* call.c (convert_like): Add parenthesis and wrap.
	(convert_like_with_context): Likewise.
	(ICS_RANK): Whitespace.
	(NEED_TEMPORARY_P): Remove parenthesis.

	* class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
	(VTT_MARKED_BINFO_P): Likewise.

	* decl.c (BINDING_LEVEL): Add parenthesis.
	(DEF_OPERATOR): Likewise.

	* mangle.c (MANGLE_TRACE): Add parenthesis.
	(write_signed_number): Likewise.
	(write_unsigned_number): Likewise.

	* pt.c (ccat): Uppercase macro parameter.
	(cat): Likewise

	* search.c (SET_BINFO_ACCESS): Add parenthesis.

2002-01-07  Jason Merrill  <>

	* decl2.c (coerce_new_type): Downgrade error for size_t mismatch
	to pedwarn.

	PR c++/3536
	* method.c (make_thunk): If !flag_weak, give the thunk the
	function's linkage.
	(use_thunk): Here, too.

2002-01-07  Graham Stott  <>

	* error.c: Update copyright date.
	(print_scope_operator): Add parenthesis.
	(print_left_paren): Likewise.
	(print_right_paren): Likewise.
	(print_left_bracket): Likewise.
	(print_right_bracket): Likewise.
	(print_template_argument_list_start): Likewise.
	(print_template_argument_list_end): Likewise.
	(print_non_consecutive_character): Likewise.
	(print_tree_identifier): Likewise.
	(print_identifier): Likewise.
	(NEXT_CODE): Uppercase macro parameter.
	(ident_fndecl): Delete unused.
	(GLOBAL_THING): Likewise.

2002-01-06  Graham Stott  <>

	* cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
	(C_IS_RESERVED_WORD): Uppercase macro parameter.
	(C_RID_YYCODE) Likewise.
	(ptrmem_cst): Use rtx.
	(LOCAL_BINDING_P): Add whitespace.
	(BINDING_SCOPE): Wrap long line.
	(BINDING_HAS_LEVEL_P): Remove parenthesis.
	(BINDING_VALUE): Wrap long line.
	(BINDING_TYPE): Whitespace.
	(IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
	(same_type_p): Uppercase macro parameters.
	(same_type_ignoring_top_level_qualifiers_p): Likewise.
	(OVL_FUNCTION): Wrap long line.
	(OVL_CHAIN): Whitespace.
	(OVL_CURRENT): Add parenthesis and whitespace.
	(OVL_NEXT): Whitespace.
	(OVL_USED): Likewise.
	(REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
	(SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
	(LANG_ID_FIELD): Whitespace.
	(IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
	(IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
	(IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
	(IDENTIFIER_TYPENAME_P): Remove parenthesis.
	(C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
	(IS_AGGR_TYPE): Uppercase macro parameter.
	(CLASS_TYPE_P): Likewise.
	(IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
	(IS_AGGR_TYPE_2): Whitespace.
	(TAGGED_TYPE_P): Uppercase macro parameter.
	(TYPE_BUILT_IN): Whitespace.
	(TYPE_FOR_JAVA): Likewise.
	(FUNCTION_ARG_CHAIN): Remove parenthesis.
	(DERIVED_FROM_P): Add parenthesis and wrap.
	(CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
	(TYPE_GETS_DELETE): Add parenthesis.
	(TYPE_HAS_CONVERSION): Add parenthesis and wrap.
	(TYPE_HAS_INIT_REF): Likewise.
	(CLASSTYPE_RTTI): Likewise.
	(CLASSTYPE_TAGS): Likewise.
	(CANONICAL_BINFO): Add parenthesis.
	(CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
	(CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
	(CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
	(BINFO_MARKED): Whitespace and wrap.
	(SET_BINFO_MARKED): Likewise.
	(BINFO_SUBVTT_INDEX): Remove parenthesis.
	(BINFO_VPTR_INDEX): Likewise.
	(VF_DERIVED_VALUE): Wrap long line.
	(NAMESPACE_LEVEL): Whitespace.
	(CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
	(DEFARG_POINTER): Whitespace.
	(DECL_NEEDED_P): Remove parenthesis.
	(DECL_LANGUAGE): Whitespace.
	(SET_DECL_LANGUAGE): Add parenthesis.
	(DECL_CONSTRUCTOR_P): Whitespace and wrap.
	(DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
	(DECL_IN_AGGR_P): Whitespace.
	(DECL_FRIEND_P): Likewise.
	(DECL_STATIC_FUNCTION_P): Whitespace and wrap.
	(DECL_DEFERRED_FN): Likewise.
	(CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
	(SET_TYPE_TEMPLATE_INFO): Add parenthesis.
	(TMPL_ARGS_LEVEL): Likewise.
	(C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
	(INTEGRAL_CODE_P(CODE): Add parenthesis.
	(CP_INTEGRAL_TYPE_P): Remove parenthesis.
	(TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
	(DECL_ACCESS): Whitespace.
	(DECL_GLOBAL_CTOR_P): Remove parenthesis.
	(DECL_GLOBAL_DTOR_P): Likewise.
	(DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
	(PRIMARY_TEMPLATE_P): Add parenthesis.
	(DECL_USE_TEMPLATE): Whitespace.
	(CALL_DECLARATOR_PARMS): Remove parenthesis.
	(TEMP_NAME_P): Wrap.
	(VFIELD_NAME_P): Likewise.
	(B_SET): Uppercase macro parameters and add parenthesis.
	(B_CLR): Likewise.
	(B_TST): Likewise.
	(LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
	(LOOKUP_TYPES_ONLY): Uppercase macro parameters.
	(LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
	(same_or_base_type_p): Likewise.
	(cp_deprecated): Likewise.

2002-01-05  Richard Henderson  <>

	* semantics.c (expand_body): Revert last change.

2002-01-04  Jason Merrill  <>

	PR c++/4122
	* class.c (update_vtable_entry_for_fn): Set delta to zero for a
	lost primary.

	* class.c (build_vtbl_initializer): Check for a lost primary
	before calculating the vtable entry to throw away.

2002-01-02  Jason Merrill  <>

	* semantics.c (expand_body): Call outlining_inline_function when
	emitting an inline function out of line.

2002-01-02  Nathan Sidwell  <>

	PR c++/5116, c++/764 reversion
	* call.c (build_new_op): Revert the instantiations. They are

2002-01-02  Nathan Sidwell  <>

	PR c++/5089
	* decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.

2002-01-02  Nathan Sidwell  <>

	PR c++/3716
	* pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
	(tsubst, case POINTER_TYPE): Handle pmfs here.
	(tsubst, case OFFSET_TYPE): Check it is not an offset to
	reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.

2002-01-02  Nathan Sidwell  <>

	PR c++/35
	* cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
	(DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
	* pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
	(tsubst_template_parms): Break up loop statements.
	(tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
	parm PARM_DECLs don't get promoted.

2002-01-02  Nathan Sidwell  <>

	PR c++/5123
	* typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
	(build_x_function_call): Cope with a COMPONENT_REF containing a

2002-01-02  Nathan Sidwell  <>

	PR c++/5213
	* pt.c (convert_template_argument): Be more careful determining
	when RECORD_TYPE templates are or are not templates.

2002-01-02  Nathan Sidwell  <>

	PR c++/775
	* cp-tree.h (handle_class_head): Adjust prototype.
	* decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
	parameters. Use for all class heads.
	* parse.y (named_class_head_sans_basetype, named_class_head,
	unnamed_class_head): Remove.
	(class_head, class_head_apparent_template): Recognize class heads
	(class_head_decl, class_head_defn): New reductions. Process class
	(structsp): Adjust class definition and class declaration
	(maybe_base_class_list): Give diagnostic on empty list.

2002-01-02  Nathan Sidwell  <>

	PR c++/4379
	* typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
	single non-static member.
	(unary_complex_lvalue): If it cannot be a pointer to member, don't
	make it so. Check it is not pointer to reference.

2002-01-02  Nathan Sidwell  <>

	PR c++/5132
	* decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
	are processing a template decl.

2002-01-02  Nathan Sidwell  <>

	PR c++/5116, c++/764
	* call.c (build_new_op): Make sure template class operands are
	instantiated. Simplify arglist construction.

2001-12-29  Nathan Sidwell  <>

	* call.c (build_user_type_conversion_1): Use my_friendly_assert
	rather than if ... abort.
	* cvt.c (convert_to_reference): Likewise.
	* semantics.c (setup_vtbl_ptr): Likewise.
	* pt.c (lookup_template_class): Comment typo.

2001-12-29  Nathan Sidwell  <>

	PR c++/5125
	* pt.c (push_template_decl_real): Make sure DECL has

2001-12-29  Nathan Sidwell  <>

	PR c++/335
	* init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
	for non-reference fields.
	* typeck.c (require_complete_type): Use resolve_offset_ref).

2001-12-26  Nathan Sidwell  <>

	PR c++/196
	* parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.

2001-12-24  Nathan Sidwell  <>

	PR c++/160
	* typeck.c (build_modify_expr): Remove old unreachable code & tidy
	up. Don't stabilize_references when initializing a reference.

2001-12-23  Kaveh R. Ghazi  <>

	* decl2.c (lang_f_options): Const-ify.

2001-12-20  Joseph S. Myers  <>

	* (diff_excludes): Remove.

2001-12-19  Nathan Sidwell  <>

	PR c++/90
	* typeck.c (build_function_call_real): Use original function
	expression for errors.

2001-12-18  Jason Merrill  <>

	PR c++/3242
	* class.c (add_method): Do compare 'this' quals when trying to match a
	used function.  Don't defer to another used function.

2001-12-18  Nathan Sidwell  <>

	* pt.c (instantiate_clone): Remove, fold into ...
	(instantiate_template): ... here. Simplify by removing mutual
	* typeck2.c (build_m_component_ref): Don't cv qualify the function
	pointed to by a pointer to function.
	* class.c (delete_duplicate_fields_1): Typo.

2001-12-18  Jason Merrill  <>

	C++ ABI change: destroy value arguments in caller.
	* semantics.c (genrtl_start_function, genrtl_finish_function): Don't
	create an extra binding level for the parameters.
	* decl.c (store_parm_decls): Don't do parameter cleanups.

2001-12-18  Nathan Sidwell  <>

	* call.c (build_new_method_call): Use '%#V'.
	* error.c (cv_to_string): Use V parameter to determine padding.

2001-12-18  Joseph S. Myers  <>

	* call.c, decl2.c, init.c: Use "built-in" and "bit-field"
	spellings in messages.

2001-12-17  Zack Weinberg  <>

	* cp-tree.h: Delete #defines for cp_error, cp_warning,
	cp_pedwarn, and cp_compiler_error.
	* call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
	except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
	rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
	typeck2.c: Change calls to the above macros to use their
	language-independent equivalents: error, warning, pedwarn, and
	internal_error respectively.

2001-12-16  Neil Booth  <>

	* decl2.c (finish_file): Remove back_end_hook.

2001-12-16  Joseph S. Myers  <>

	* ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
	cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
	pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.

2001-12-15  Joseph S. Myers  <>

	* lang-options.h: Use American spelling in messages.

2001-12-13  Jason Merrill  <>

	* (parse.h): Separate rule, just depend on parse.c.

	Use cleanups to run base and member destructors.
	* init.c (push_base_cleanups): New function, split out from...
	(build_delete):  Lose !TYPE_HAS_DESTRUCTOR code.
	* decl.c (finish_destructor_body): Move vbase destruction code to
	(begin_function_body, finish_function_body): New fns.
	(finish_function): Move [cd]tor handling and call_poplevel to
	(pushdecl): Skip the new level.
	* semantics.c (genrtl_try_block): Don't call end_protect_partials.
	(setup_vtbl_ptr): Call push_base_cleanups.
	* method.c (synthesize_method): Call {begin,end}_function_body.
	* pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
	* cp-tree.h: Declare new fns.
	* parse.y (function_body, .begin_function_body): New nonterminals.
	(fndef, pending_inline, function_try_block): Use function_body.
	(ctor_initializer_opt, function_try_block): No longer has a value.
	(base_init): Remove .set_base_init token.
	(.set_base_init, compstmt_or_error): Remove.
	* (parse.c): Expect two fewer s/r conflicts.

	* optimize.c (maybe_clone_body): Fix parameter updating.

2001-12-12  Jason Merrill  <>

	* decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
	* semantics.c (genrtl_start_function): Don't pass
	parms_have_cleanups or push an extra binding level.
	(genrtl_finish_function): Lose cleanup_label cruft.

	* cp-tree.h (struct cp_language_function): Remove x_ctor_label.
	(ctor_label): Remove.
	* semantics.c (finish_return_stmt): Lose ctor_label support.
	* decl.c (finish_constructor_body, mark_lang_function): Likewise.
	* typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not

	* call.c (build_new_method_call): Let resolves_to_fixed_type_p
	check for [cd]tors.
	* class.c (fixed_type_or_null, case INDIRECT_REF): Fix.

	* decl.c (finish_function): Check VMS_TARGET, not VMS.

	* decl.c (start_cleanup_fn): Remove redundant pushlevel.
	(end_cleanup_fn): And poplevel.

	* semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
	if we're in a template.

2001-12-12  Jakub Jelinek  <>

	THIS_NAME_P): Delete.
	* spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
	THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
	with internal naming scheme.
	* error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.

2001-12-12  Nathan Sidwell  <>

	* decl.c (grokdeclarator): Deprecated implicit typename use.

2001-12-11  Nathan Sidwell  <>

	PR g++/51
	* parse.y (frob_specs): Indicate it is a language linkage which
	contained the extern.
	* decl.c (grokdeclarator): Allow extern language linkage with
	other specifiers.

2001-12-10  Nathan Sidwell  <>

	PR g++/72
	* decl.c (add_binding): Don't reject duplicate typedefs involving
	template parameters.

2001-12-10  Neil Booth  <>

	* parse.y, semantics.c: Similarly.

2001-12-09  Nathan Sidwell  <>

	PR g++/87
	* cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
	(copy_args_p): Rename to ...
	(copy_fn_p): ... here.
	(grok_special_member_properties): New function.
	(grok_op_properties): Lose VIRTUALP parameter.
	(copy_assignment_arg_p): Remove.
	* call.c (build_over_call): Use copy_fn_p.
	* decl.c (grokfndecl): Reformat. Adjust call to
	(copy_args_p): Rename to ...
	(copy_fn_p): ... here. Reject template functions. Check for pass
	by value.
	(grok_special_member_properties): Remember special functions.
	(grok_ctor_properties): Don't remember them here, just check.
	(grok_op_properties): Likewise.
	(start_method): Call grok_special_member_properties.
	* decl2.c (grokfield): Likewise.
	(copy_assignment_arg_p): Remove.
	(grok_function_init): Don't remember abstract assignment here.
	* pt.c (instantiate_class_template): Call
	(tsubst_decl): Adjust grok_op_properties call.

2001-12-08  Aldy Hernandez  <>

	* lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and

2001-12-08  John David Anglin  <>

	* semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
	call to build_aggr_init.
	* cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.

2001-12-08  Neil Booth  <>

	* parse.y: Replace uses of the string non-terminal with STRING.
	Don't perform string concatentaion here.
	(string): Remove non-terminal.
	* semantics.c (finish_asm_stmt): Don't concatenate strings here.

2001-12-05  Jason Merrill  <>

	* tree.c (cp_start_inlining, cp_end_inlining): New fns.
	* pt.c (push_tinst_level): No longer static.
	* cp-tree.h: Declare them.

	* init.c (resolve_offset_ref): Don't check access for the base
	conversion to access a FIELD_DECL.

	* cp-tree.h (TYPE_REFFN_P): New macro.
	* decl.c (bad_specifiers): Check it, too.

	* rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
	on the __*_type_info type if we haven't seen a definition.

2001-12-05  Neil Booth  <>

	* decl.c: Include c-common.h.
	(shadow_warning): Move to c-common.c.

Wed Dec  5 17:00:49 2001  Richard Kenner  <>

	* decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.

2001-12-04  Nathan Sidwell  <>

	* pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.

2001-12-04  Nathan Sidwell  <>

	PR g++/164
	* init.c (sort_base_init): Allow binfos to be directly specified.
	* method.c (do_build_copy_constructor): Explicitly convert to the
	base instance.
	(do_build_assign_ref): Likewise.

2001-12-03  Hans-Peter Nilsson  <>

	* decl.c (xref_basetypes): Don't use C99 construct in tag_code
	declaration and initialization.

2001-12-03  Neil Booth  <>

	* typeck2.c: Remove leading capital from diagnostic messages, as
	per GNU coding standards.

2001-12-03  Mumit Khan  <>

	PR c++/3394
	* decl.c (xref_basetypes): Handle attributes between
	'class' and name.

2001-12-03  Nathan Sidwell  <>

	PR g++/3381
	* parse.y (named_complex_class_head_sans_basetype): Add new
	* (parse.c): Adjust expected conflict count.

2001-12-03  Jason Merrill  <>

	* class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
	immediate binfos for our virtual bases.

2001-12-02  Neil Booth  <>

	* call.c (build_java_interface_fn_ref): Similarly.
	* except.c (is_admissible_throw_operand): Similarly.
	* init.c (build_java_class_ref): Similarly.
	* xref.c (open_xref_file): Similarly.

2001-12-01  Neil Booth  <>

	* class.c (finish_struct): Remove trailing periods from messages.
	* decl.c (check_tag_decl): Similarly.
	* lex.c (cxx_set_yydebug): Similarly.
	* typeck2.c (friendly_abort): Similarly.

2001-11-29  Mark Mitchell  <>

	PR c++/3048
	* cp-tree.h (ovl_member): Remove.
	* decl2.c (merge_functions): Handle extern "C" functions
	* tree.c (ovl_member): Remove.

2001-11-29  Mark Mitchell  <>

	PR c++/4842
	* class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
	FUNCTION_DECL, as input.
	(mark_overriders): Remove.
	(warn_hidden): Rework for the new ABI.

2001-11-29  Mark Mitchell  <>

	PR c++/3471
	* call.c (convert_like_real): Do not build additional temporaries
	for rvalues of class type.

2001-11-28  Nathan Sidwell  <>

	* cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
	(DERIVED_FROM_P): Likewise.
	(enum base_access): Renumber, add ba_quiet bit mask.
	(get_binfo): Remove.
	(get_base_distance): Remove.
	(binfo_value): Remove.
	* call.c (standard_conversion): Use lookup_base.
	* class.c (strictly_overrides): Likewise.
	(layout_virtual_bases): Likewise.
	(warn_about_ambiguous_direct_bases): Likewise.
	(is_base_of_enclosing_class): Likewise.
	(add_vcall_offset_vtbl_entries_1): Likewise.
	* cvt.c (build_up_reference): Adjust comment.
	* init.c (build_member_call): Reformat.
	* search.c (get_binfo): Remove.
	(get_base_distance_recursive): Remove.
	(get_base_distance): Remove.
	(lookup_base_r): Tweak.
	(lookup_base): Add ba_quiet control. Complete the types here.
	(covariant_return_p): Use lookup_base.
	* tree.c (binfo_value): Remove.
	(maybe_dummy_object): Use lookup_base.
	* typeck.c (build_static_cast): Use lookup_base.
	(get_delta_difference): Likewise.
	* typeck2.c (binfo_or_else): Use lookup_base.
	(build_scoped_ref): Add back error_mark_check.
	(build_m_component_ref): Use lookup_base.

2001-11-29  Joseph S. Myers  <>

	* (c++.generated-manpages): New dummy target.

Tue Nov 27 09:03:47 2001  Richard Kenner  <>

	* (cp-lang.o): Depends on c-common.h.
	* cp-lang.c (c-common.h): Include.
	* decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
	* expr.c (init_cplus_expand): Don't set lang_expand_constant.

2001-11-26  Neil Booth  <>

	* decl2.c (c_language): Move to c-common.c.
	* lex.c (cxx_post_options, cxx_init_options): Use c-common.c
	(cxx_init): Update.

2001-11-26  Jason Merrill  <>

	* call.c (joust): Remove COND_EXPR hack.

2001-11-25  Aldy Hernandez  <>

	* search.c (lookup_base_r): Declare bk in variable declaration

2001-11-25  Nathan Sidwell  <>

	PR g++/3145
	* class.c (build_vbase_pointer): Remove.
	(build_vbase_path): Remove.
	(build_base_path): New function.
	* cp-tree.h (base_access, base_kind): New enumerations.
	(build_base_path): Declare.
	(convert_pointer_to_real): Remove.
	(convert_pointer_to): Remove.
	(lookup_base): Declare.
	(convert_pointer_to_vbase): Remove.
	* call.c (build_scoped_method_call): Use lookup_base &
	build_base_path instead of convert_pointer_to_real,
	get_base_distance & get_binfo.
	(build_over_call): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	(convert_to_pointer_force): Likewise.
	(build_up_reference): Likewise.
	(convert_pointer_to_real): Remove.
	(convert_pointer_to): Remove.
	* init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
	instead of convert_pointer_to_vbase & build_vbase_path.
	(emit_base_init): Use build_base_path instead of
	(expand_virtual_init): Lose unrequired conversions.
	(resolve_offset_ref): Use lookup_base and build_base_path
	instead of convert_pointer_to.
	* rtti.c (build_dynamic_cast_1): Use lookup_base &
	build_base_path instead of get_base_distance & build_vbase_path.
	* search.c (get_vbase_1): Remove.
	(get_vbase): Remove.
	(convert_pointer_to_vbase): Remove.
	(lookup_base_r): New function.
	(lookup_base): New function.
	* typeck.c (require_complete_type): Use lookup_base &
	build_base_path instead of convert_pointer_to.
	(build_component_ref): Likewise.
	(build_x_function_call): Likewise.
	(get_member_function_from_ptrfunc): Likewise.
	(build_component_addr): Likewise.
	* typeck2.c (build_scoped_ref): Likewise.

2001-11-22  Bryce McKinlay  <>

	* cp-tree.h (CP_TYPE_QUALS): Removed.
	* decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
	* dump.c (cp_dump_tree): Use void* dump_info argument to match
	lang-hooks prototype.
	* call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
	rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
	CP_TYPE_QUALS changed to cp_type_quals.
	* References to c-dump.h changed to tree-dump.h.
	(CXX_C_OBJS): Remove c-dump.o.

2001-11-21  Mark Mitchell  <>

	PR c++/3637
	* pt.c (lookup_template_class): Ensure that all specializations
	are registered on the list corresponding to the most general

2001-11-20  Mark Mitchell  <>

	* call.c (non_reference): Add documentation.
	(convert_class_to_reference): Do not strip reference types
	from conversion operators.
	(maybe_handle_ref_bind): Simplify.
	(compare_ics): Correct handling of references.

2001-11-19  John Wilkinson <>

	* dump.c (dump_op): New function.
	dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.

2001-11-19  Mark Mitchell  <>

	* semantics.c (finish_sizeof): Make sure that expression created
	while processing a template do not have a type.
	(finish_alignof): Likewise.
	* typeck.c (c_sizeof): Likewise.
	(expr_sizeof): Likewise.

2001-11-18  Neil Booth  <>

	* lex.c (cxx_finish): Call c_common_finish.
	(finish_parse): Remove.

2001-11-17  Kriang Lerdsuwanakij  <>

	* decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
	when displaying error message about missing array bounds.

2001-11-17  Kriang Lerdsuwanakij  <>

	* mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,

2001-11-16  Neil Booth  <>

	* cp-tree.h (print_class_statistics): Restore.

2001-11-15  Jason Merrill  <>

	* method.c (use_thunk): Don't emit debugging information for thunks.

	* parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
	* decl.c (make_typename_type): Handle getting a class template.
	* search.c (lookup_field_r): A class template is good enough for

	* call.c (convert_like_real): Only use cp_convert for the bad part.
	(standard_conversion): Also allow bad int->enum.
	* typeck.c (ptr_reasonably_similar): Also allow functions to
	interconvert.  Pointers to same-size integers are reasonably

	* cvt.c (convert_to_void): If we build a new COND_EXPR, always
	give it void type.

2001-11-15  Nathan Sidwell  <>

	PR g++/3154
	* init.c (sort_base_init): Remove unreachable code.
	(expand_member_init): Adjust comment to reflect reality. Simplify
	and remove unreachable code.

2001-11-15  Neil Booth  <>

	* cp-tree.h (init_reswords, cxx_init_decl_processing): New.
	(cxx_init): Update prototype.
	* decl.c (init_decl_processing): Rename.  Move null node init
	to its creation time.
	* lex.c (cxx_init_options): Update.
	(cxx_init): Combine with old init_parse; also call

2001-11-14  Richard Sandiford  <>

	* decl.c (check_initializer): Try to complete the type of an
	array element before checking whether it's complete.  Don't
	complain about arrays with complete element types but an
	unknown size.
	(cp_finish_decl): Build the hierarchical constructor before
	calling maybe_deduce_size_from_array_init.

2001-11-14  Joseph S. Myers  <>

	* Change all uses of $(manext) to $(man1ext).

2001-11-13  Nathan Sidwell  <>

	PR g++/4206
	* parse.y (already_scoped_stmt): Remove.
	(simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.

2001-11-12  H.J. Lu <>

	* cvt.c (ocp_convert): Don't warn the address of a weak
	function is always `true'.

2001-11-09  Neil Booth  <>

	* cp-tree.h (print_class_statistics): Remove.
	(cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
	cxx_print_identifier, cxx_set_yydebug): New.
	* lex.c (set_yydebug): Rename c_set_yydebug.
	* ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
	lang_print_xnode): Rename.
	* tree.c (print_lang_statistics): Rename.

2001-11-09  Kaveh R. Ghazi  <>

	* class.c (dump_array): Fix format specifier warning.

2001-11-09  Neil Booth  <>

	* cp-lang.c (LANG_HOOKS_NAME): Override.
	(struct lang_hooks): Constify.
	* lex.c (cxx_init_options): Update.
	(lang_identify): Remove.
	* parse.y (language_string): Remove.

2001-11-08  Andreas Franck  <>

	DEMANGLER_CROSS_NAME): Handle program_transform_name the way
	suggested by autoconf.
	(c++.install-common): Use the transformed target alias names.

2001-11-06  Neil Booth  <>

	* Update.
	* cp-lang.c: Include langhooks-def.h.

2001-11-04  Kriang Lerdsuwanakij  <>

	* pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.

2001-11-03  Kaveh R. Ghazi  <>

	* lex.c (copy_lang_type): Add static prototype.

2001-11-02  Kriang Lerdsuwanakij  <>

	* pt.c (unify): Handle SCOPE_REF.

2001-11-01  Jakub Jelinek  <>

	* tree.c (cp_copy_res_decl_for_inlining): Adjust
	DECL_ABSTRACT_ORIGIN for the return variable.

2001-10-31  Zack Weinberg  <>

	* Replace $(INTL_TARGETS) with po-generated.

2001-10-28  Joseph S. Myers  <>

	* ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
	semantics.c, spew.c: Fix spelling errors.

2001-10-27  Kriang Lerdsuwanakij  <>

	* decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.

2001-10-25  Zack Weinberg  <>

	* cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to

Tue Oct 23 14:00:20 2001  Richard Kenner  <>

	* cp-lang.c (cxx_get_alias_set): New function.

2001-10-23  Kriang Lerdsuwanakij  <>

	* cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
	* cp-tree.h (make_unbound_class_template): Prototype new function.
	* decl.c (make_unbound_class_template): New function.
	* decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
	* error.c (dump_type): Likewise.
	* mangle.c (write_type): Likewise.
	* parse.y (template_parm): Likewise.
	(template_argument): Use make_unbound_class_template.
	* pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
	(tsubst): Likewise.
	(tsubst_copy): Likewise.
	(unify): Likewise.
	* tree.c (walk_tree): Likewise.
	* typeck.c (comptypes): Likewise.

2001-10-21  Kaveh R. Ghazi  <>

	* xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
	extra calls into fewer ones.

2001-10-18  Alexandre Oliva  <>

	* decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
	Warn when merging inline with attribute noinline.
	(start_decl, start_function): Warn if inline and attribute
	noinline appear in the same declaration.

2001-10-16  H.J. Lu <>

	for tree checking disabled.

2001-10-16  Hans-Peter Nilsson  <>

	NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.

2001-10-15  Richard Sandiford  <>

	(unify): Only handle MINUS_EXPR specially if the above flag is set
	and the subtracted constant is 1.  Clear the flag on recursive calls.
	Set it when unifying the maximum value in an INTEGER_TYPE's range.

2001-10-15  Richard Sandiford  <>

	* decl.c (bad_specifiers): Don't allow exception specifications
	on any typedefs.

2001-10-14  Neil Booth  <>

	* cp/lex.c (init_cp_pragma): Similarly.

2001-10-13  Kriang Lerdsuwanakij  <>

	* pt.c (lookup_template_class): Build complete template arguments

2001-10-12  Kriang Lerdsuwanakij  <>

	* cp-tree.h (TYPE_BINFO): Update comment.
	(copy_type): Prototype new function.
	* lex.c (copy_lang_decl): Gather tree node statistics.
	(copy_lang_type): New function.
	(copy_type): Likewise.
	(cp_make_lang_type): Create lang_type for
	* pt.c (tsubst): Use copy_type instead of copy_node.
	* search.c (lookup_field_1): Ignore TYPENAME_TYPE.

2001-10-12  Kriang Lerdsuwanakij  <>

	* pt.c (determine_specialization): Ignore functions without

2001-10-12  Nathan Sidwell  <>

	PR g++/4476
	* typeck2.c (abstract_virtuals_error): Ignore incomplete classes.

2001-10-11  Jason Merrill  <>

	* typeck2.c (store_init_value): Don't re-digest a bracketed

	* class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of

2001-10-11  Richard Henderson  <>

	* class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
	of an asm statement.
	(build_vtbl_ref_1): Split out from build_vtbl_ref.
	(build_vfn_ref): Use it to handle vtable descriptors before
	calling build_vtable_entry_ref.
	* decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.

2001-10-10  Richard Henderson  <>

	* parse.y (asm_operand): Allow named operands.
	* semantics.c (finish_asm_stmt): Tweek for changed location
	of the operand constrant.

2001-10-09  Jason Merrill  <>

	* call.c (standard_conversion): Add bad conversion between
	integers and pointers.
	(convert_like_real): Don't use convert_for_initialization for bad
	conversions; complain here and use cp_convert.
	(build_over_call): Don't handle bad conversions specially.
	(perform_implicit_conversion): Allow bad conversions.
	(can_convert_arg_bad): New fn.
	* cp-tree.h: Declare it.
	* typeck.c (convert_for_assignment): Use it.
	(ptr_reasonably_similar): Any target type is similar to void.

2001-10-08  Alexandre Oliva  <>

	* (CXX_OBJS): Added cp-lang.o.
	(cp/cp-lang.o): New rule.
	* cp-tree.h: Declare hooks.
	* tree.c: Make hooks non-static.
	(init_tree): Don't initialize hooks here.
	* lex.c: Likewise.  Move definition of lang_hooks to...
	* cp-lang.c: ... new file.

2001-10-08  Richard Henderson  <>

	* cp-tree.h (struct lang_decl_flags): Remove declared_inline.
	(DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.

2001-10-07  Kaveh R. Ghazi  <>

	* class.c (build_vtable_entry_ref): Const-ify.
	* decl.c (predefined_identifier,
	initialize_predefined_identifiers): Likewise.
	* init.c (build_new_1): Likewise.
	* lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):

2001-10-05  Alexandre Oliva  <>

	* optimize.c (struct inline_data): Moved to ../tree-inline.c.
	(INSNS_PER_STMT): Likewise.
	(remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
	(copy_body, initialize_inlined_parameters): Likewise.
	(declare_return_variable, inlinable_function_p): Likewise.
	(expand_call_inline, expand_calls_inline): Likewise.
	(optimize_inline_calls, clone_body): Likewise.
	* tree.c (walk_tree): Moved to ../tree-inline.c.
	(walk_tree_without_duplicates): Likewise.
	(copy_tree_r, remap_save_expr): Likewise.

2001-10-04  Alexandre Oliva  <>

	* (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
	(cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
	* cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
	(flag_inline_trees): Moved declaration to ../tree-inline.h.
	(walk_tree): Moved declaration to ../tree-inline.h.
	(walk_tree_without_duplicates, copy_tree_r): Likewise.
	(remap_save_expr): Likewise.
	* decl.c: Include tree-inline.h.
	(lang_mark_tree): Don't mark inlined_fns.
	* decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
	* optimize.c: Include tree-inline.h.
	(optimize_inline_calls): Move declaration to ../tree.h, as
	(remap_decl): Use language-independent constructs and hooks.
	(remap_block, copy_body_r, declare_return_variable): Likewise.
	(inlinable_function_p): Likewise.  Don't test for
	DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
	no longer language-specific.
	(optimize_inline_calls): Likewise.  Make it non-static.  Moved
	call of dump_function to...
	(optimize_function): Here...
	(clone_body): New function, extracted from...
	(maybe_clone_body): ... here.  Build decl_map locally and pass
	it on to clone_body.
	* pt.c, semantics.c: Include tree-inline.h.
	* tree.c: Likewise.
	(cp_walk_subtrees): New language-specific hook for tree inlining.
	(cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
	cp_is_overload_p, cp_auto_var_in_fn_p,
	cp_copy_res_decl_for_inlining): Likewise.
	(walk_tree): Move language-specific constructs into...
	(cp_walk_subtrees): this new function.
	(copy_tree_r): Use language-independent constructs and hooks.
	(init_tree): Initialize tree inlining hooks.
	(remap_save_expr): Adjust prototype so that the declaration
	does not require the definition of splay_tree.

2001-10-03  John David Anglin  <>

	* rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
	to build the declaration instead of the declaration itself.

2001-10-02  Jason Merrill  <>

	* decl2.c (cxx_decode_option): Add 'else'.

	* spew.c (end_input): No longer static.
	* cp-tree.h: Declare it.
	* parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.

2001-10-02  Joseph S. Myers  <>

	* call.c (build_over_call), typeck.c (build_function_call_real):
	Pass type attributes to check_function_format rather than name or
	assembler name.  Don't require there to be a name or assembler
	name to check formats.

2001-10-02  Joseph S. Myers  <>

	* decl.c (init_decl_processing): Don't call
	init_function_format_info.  Initialize lang_attribute_table
	(builtin_function): Call decl_attributes.
	(insert_default_attributes): New.

2001-10-01  Jason Merrill  <>

	* decl.c (grokdeclarator): Copy array typedef handling from C

	* decl.c (grokdeclarator): Copy too-large array handling from C

2001-09-29  Alexandre Oliva  <>

	* (target_libs): Added target-gperf, so that we
	don't try to build it if C++ is disabled.

2001-09-23  Zack Weinberg  <>

	* (CXX_OBJS): Take out cp/errfn.o.
	(cp/errfn.o): Delete rule.
	(cp/error.o): Depend on flags.h.
	* errfn.c: Delete file.
	* cp-tree.h: Declare warn_deprecated.  Remove definitions of
	and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
	cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
	internal_error respectively.  Make cp_deprecated into a macro.
	Don't define cp_printer typedef or declare cp_printers.
	* error.c: Include flags.h.
	Delete: struct tree_formatting_info, print_function_argument_list,
	print_declaration, print_expression, print_function_declaration,
	print_function_parameter, print_type_id, print_cv_qualifier_seq,
	print_type_specifier_seq, print_simple_type_specifier,
	print_elaborated_type_specifier, print_rest_of_abstract_declarator,
	print_parameter_declaration_clause, print_exception_specification,
	print_nested_name_specifier, and definition of cp_printers.
	(locate_error): New function.
	(cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
	rewritten in terms of locate_error and diagnostic.c.
	(cp_tree_printer): Rename cp_printer; wire up to *_to_string
	instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
	(init_error): Adjust to match.

Sat Sep 22 09:15:31 2001  Richard Kenner  <>

	* (CXX_C_OBJS): Add attribs.o.

2001-09-21  Richard Henderson  <>

	* class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
	(build_vtbl_initializer): Likewise.
	(build_vfn_ref): New.
	* cp-tree.h: Declare it.
	* call.c (build_over_call): Use it.
	* decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
	* typeck.c (get_member_function_from_ptrfunc): Mind descriptors.

Fri Sep 21 08:16:19 2001  J"orn Rennecke <>

	* decl.c (grokdeclarator): Use C syntax for attr_flags declaration.

2001-09-21  Joseph S. Myers  <>

	Table-driven attributes.
	* decl2.c (cplus_decl_attributes): Only take one attributes
	* cp-tree.c (cplus_decl_attributes): Update prototype.
	* class.c (finish_struct), decl.c (start_decl, start_function),
	decl2.c (grokfield), friend.c (do_friend), parse.y
	(parse_bitfield): Update calls to cplus_decl_attributes.
	* decl.c (grokdeclarator): Take a pointer to a single ordinary
	attribute list.
	* decl.h (grokdeclarator): Update prototype.
	* decl2.c (grokfield): Take a single ordinary attribute list.
	* friend.c (do_friend): Likewise.
	* decl.c (shadow_tag, groktypename, start_decl,
	start_handler_parms, grokdeclarator, grokparms, start_function,
	start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
	parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
	(process_template_parm, do_decl_instantiation): Pass single
	ordinary attribute lists around.
	* decl.c (grokdeclarator): Correct handling of nested attributes.
	Revert the patch
	1998-10-18  Jason Merrill  <>
		* decl.c (grokdeclarator): Embedded attrs bind to the right,
		not the left.
	* cp-tree.h (cp_valid_lang_attribute): Remove declaration
	(cp_attribute_table): Declare.
	* decl.c (valid_lang_attribute): Don't define.
	(lang_attribute_table): Define.
	(init_decl_processing): Initialize lang_attribute_table instead of
	* tree.c (cp_valid_lang_attribute): Remove.
	(handle_java_interface_attribute, handle_com_interface_attribute,
	handle_init_priority_attribute): New functions.
	(cp_attribute_table): New array.
	* decl2.c (import_export_class): Don't use

2001-09-15  Gabriel Dos Reis  <>

	* (cp/error.o): Depend on real.h
	* error.c: #include "real.h"

2001-09-15  Kaveh R. Ghazi  <>

	* mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of

2001-09-13  Kaveh R. Ghazi  <>

	* decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
	* pt.c (tsubst_decl): Likewise.

2001-09-12  Kaveh R. Ghazi  <>

	* decl2.c (lang_f_options): Const-ification.
	* lex.c (cplus_tree_code_name): Likewise.
	* spew.c (yyerror): Likewise.

2001-09-06  Nathan Sidwell  <>

	PR c++/3986
	* class.c (force_canonical_binfo_r): Check & move an indirect
	primary base first.
	(force_canonical_binfo): Check that it's not already
	(mark_primary_virtual_base): Remove BINFO parameter.
	(mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.

2001-09-06  Nathan Sidwell  <>

	* cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
	* class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
	(layout_class_type): Don't call fixup_inline_methods here ...
	(finish_struct_1): ... call it here.

2001-09-04  Mark Mitchell  <>

	* decl.c (duplicate_decls): Remove code deadling with
	* decl2.c (finish_file): Likewise.
	* pt.c (instantiate_decl): Likewise.
	* semantics.c (expand_body): Don't defer local functions if
	they wouldn't be deferred for some other reason.  Don't
	generate RTL for functions that will not be emitted.
	(genrtl_start_function): Remove code deadling with
	(genrtl_finish_function): Likewise.

2001-09-04  Nathan Sidwell  <>

	PR c++/4203
	* call.c (build_over_call): Do not optimize any empty base

2001-08-31  Kriang Lerdsuwanakij  <>

	* error.c (dump_template_decl): Output template parameters
	together with their specifiers.
	Output `class' prefix for template template parameter.
	(dump_decl): Fix formatting.

2001-08-30  Kurt Garloff  <>

	* optimize.c (inlinable_function_p): Allow only smaller single
	functions. Halve inline limit after reaching recursive limit.

2001-08-30  Joern Rennecke <>
	    Jason Merrill  <>

	* class.c (build_vtable_entry_ref): Subtract in char*, not

2001-08-23  Jason Merrill  <>

	* tree.c (cp_build_qualified_type_real): Use get_qualified_type.
	(build_cplus_array_type): Use cp_build_qualified_type, not
	TYPE_MAIN_VARIANT, to get an unqualified version.

	* decl2.c (grok_alignof): Lose.
	(build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
	* typeck.c (c_alignof): Lose.
	* semantics.c (finish_sizeof, finish_alignof): New.
	* parse.y: Use them.
	* cp-tree.h: Declare them.

2001-08-22  Jason Merrill  <>

	* pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
	* tree.c (cp_statement_code_p): A TAG_DEFN is a statement.

2001-08-19  Jakub Jelinek  <>

	* typeck2.c (add_exception_specifier): Only require complete type if
	not in processing template declaration.

2001-08-18  Kaveh R. Ghazi  <>

	* decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
	GNU_xref_start_scope and GNU_xref_end_scope.

	* tree.c (TYPE_HASH): Moved to ../tree.h.

2001-08-16  Mark Mitchell  <>

	* cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS

2001-08-14  Richard Henderson  <>

	* class.c, cp-tree.h (build_vfn_ref): Remove.
	* call.c, rtti.c: Replace all refernces with build_vtbl_ref.

2001-08-13  Mark Mitchell  <>

	* call.c (build_over_call): Mark COMPOUND_EXPRs generated for
	empty class assignment as having side-effects to avoid
	spurious warnings.

2001-08-13  Zack Weinberg  <>

	* (cp/except.o): Add libfuncs.h to dependencies.
	* except.c: Include libfuncs.h.

2001-08-11  Gabriel Dos Reis  <>

	* decl.c (grokdeclarator): Clarify diagnostic message.

2001-08-13  Kriang Lerdsuwanakij  <>

	* decl2.c (do_nonmember_using_decl): Replace using directive
	with using declaration in the error message.

2001-08-11  Kriang Lerdsuwanakij  <>

	* pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
	criterion to avoid rebuilding expression tree instead of

2001-08-07  Jason Merrill  <>

	Support named return value optimization for inlines, too.
	* decl.c (finish_function): Nullify returns here.
	* semantics.c (genrtl_start_function): Not here.
	(cp_expand_stmt): Don't mess with CLEANUP_STMTs.
	(nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
	Also nullify the CLEANUP_STMT for the nrv.
	* cp-tree.h: Declare it.
	* optimize.c (declare_return_variable): Replace the nrv with the
	return variable.
	* typeck.c (check_return_expr): Be more flexible on alignment check.
	Ignore cv-quals when checking for a matching type.

2001-08-09  Richard Henderson  <>

	* decl2.c (finish_objects): Use target hooks instead of
	assemble_constructor and assemble_destructor.

2001-08-08  John David Anglin  <>

	* g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.

2001-08-07  Nathan Sidwell  <>

	PR c++/3820
	* call.c (build_over_call): Be careful when copy constructing
	or assigning to an empty class.
	* class.c (check_bases_and_members): It has a
	COMPLEX_ASSIGN_REF if it has a vptr.
	(layout_class_type): Don't add empty class padding to
	(finish_struct_1): Don't add the VFIELD either.
	* cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_

2001-08-07  Jason Merrill  <>

	* tree.c (walk_tree): Walk siblings even if !walk_subtrees.

2001-08-06  Richard Henderson  <>

	* decl2.c (finish_objects): Pass a symbol_ref and priority to
	assemble_{constructor,destructor}.  Remove priority handling.

2001-08-05  Gabriel Dos Reis  <>

	Don't allow template-id in using-declaration.
	* decl2.c (validate_nonmember_using_decl): Handle template-ids.
	(do_class_using_decl): Likewise.

2001-08-04  Neil Booth  <>

	* cp/spew.c (read_token): No need to pop buffers.

2001-08-02  Stan Shebs  <>

	* cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
	(fnaddr_from_vtable_entry): Remove decl.
	* method.c (use_thunk): Update comment.

2001-08-01  Andrew Cagney  <>

	* repo.c (get_base_filename): Change return value to const char

2001-08-02  Nathan Sidwell  <>

	Kill -fhonor-std.
	* NEWS: Document.
	* cp-tree.h (flag_honor_std): Remove.
	(CPTI_FAKE_STD): Remove.
	(std_node): Remove comment about it being NULL.
	(fake_std_node): Remove.
	* decl.c (in_fake_std): Remove.
	(walk_namespaces_r): Remove fake_std_node check.
	(push_namespace): Remove in_fake_std code.
	(pop_namespace): Likewise.
	(lookup_name_real): Remove fake_std_node check.
	(init_decl_processing): Always create std_node. Always add
	std:: things there.
	(builtin_function): Always put non '_' fns in std.
	* decl2.c (flag_honor_std): Remove.
	(lang_f_options): Remove honor-std.
	(unsupported_options): Add honor-std.
	(set_decl_namespace): Remove fake_std_node check.
	(validate_nonmember_using_decl): Likewise.
	(do_using_directive): Likewise.
	(handle_class_head): Likewise.
	* dump.c (cp_dump_tree): Likewise.
	* except.c (init_exception_processing): Adjust.
	* init.c (build_member_call): Remove fake_std_node check.
	(build_offset_ref): Likewise.
	* lang-options.h: Remove -fhonor-std, -fno-honor-std.
	* rtti.c (init_rtti_processing): Adjust.

2001-07-31  Alexandre Petit-Bianco  <>

	* tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
	operand while calling cp_tree_equal.

2001-07-31  Nathan Sidwell  <>

	The 3.0 ABI no longer has vbase pointer fields.
	* method.c (do_build_copy_constructor): Adjust.
	(do_build_assign_ref): Adjust.
	* search.c (lookup_field_r): Adjust.
	* typeck.c (build_component_ref): Adjust.

	The 3.0 ABI always has a vtable pointer at the start of every
	polymorphic class.
	* rtti.c (build_headof_sub): Remove.
	(build_headof): Adjust.
	(get_tinfo_decl_dynamic): No need to check flag_rtti
	here. Adjust.
	(create_real_tinfo_var): Explain why we need a hidden name.

2001-07-31  Nathan Sidwell  <>

	PR c++/3631
	* class.c (update_vtable_entry_for_fn): The fixed adjustment
	of a virtual thunk should be from declaring base.

2001-07-31  Nathan Sidwell  <>

	* class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
	the shared virtual base, so preserving inheritance graph order.

2001-07-30  Andreas Jaeger  <>

	* decl2.c: Remove unused var global_temp_name_counter.

2001-07-28  Richard Henderson  <>

	* method.c (pending_inlines): Remove.

2001-07-27  Nathan Sidwell  <>

	* class.c (mark_primary_virtual_base): Don't adjust base
	offsets here.
	(dfs_unshared_virtual_bases): Adjust them here.
	(mark_primary_bases): Explain why we adjust at the end.

2001-07-27  Nathan Sidwell  <>

	* class.c (finish_struct_1): When copying the primary base's
	VFIELD, make sure we find it is at offset zero.

2001-07-26  Kriang Lerdsuwanakij  <>

	* pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
	tsubst_expr for default template arguments.

2001-07-26  Nathan Sidwell  <>

	PR c++/3621
	* spew.c (yylex): Only copy the token's lineno, if it is

2001-07-26  Nathan Sidwell  <>

	PR c++/3624
	* call.c (resolve_args): Simplify, call
	(build_new_op): Resolve and convert from reference ARG1
	earlier. Adjust ARG2 & ARG3 resolve and conversion.

2001-07-26  Nathan Sidwell  <>

	* decl.c (last_function_parm_tags): Remove.
	(current_function_parm_tags): Remove.
	(init_decl_processing): Adjust.
	(start_function): Adjust.
	(store_parm_decls): Adjust.

	PR c++/3152
	* decl.c (grokdeclarator): Detect when a function typedef is
	declaring a function, and create last_function_parms correctly.

2001-07-25  Jason Merrill  <>

	* call.c (joust): Only prefer a non-builtin candidate to a builtin
	one if they have the same signature.

	* cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
	it rather than toplevel_bindings_p.  Give it a mangled name if static.
	(convert_to_reference): Adjust.
	* decl2.c (get_temp_name): Lose.
	* mangle.c (mangle_ref_init_variable): New fn.
	(mangle_guard_variable): Strip the ref-init header.
	* cp-tree.h: Adjust.
	* decl.c (cp_finish_decl): Add the DECL_STMT after processing the
	(grok_reference_init): Always use DECL_INITIAL.

2001-07-25  Nathan Sidwell  <>

	PR c++/3416
	* call.c (build_conditional_expr): Recheck args after
	* cp-tree.h (build_conditional_expr): Move to correct file.
	* typeck.c (decay_conversion): Diagnose any unknown types
	reaching here.
	(build_binary_op): Don't do initial decay or default
	conversions on overloaded functions.
	(build_static_cast): Don't do a decay conversion here.

2001-07-25  Nathan Sidwell  <>

	PR c++/3543
	* typeck.c (condition_conversion): Resolve an OFFSET_REF.
	* expr.c (cplus_expand_expr): An OFFSET_REF should never get here.

2001-07-25  Nathan Sidwell  <>

	* class.c (build_vtbl_or_vbase_field): Remove, move into ...
	(create_vtbl_ptr): ... here.

2001-07-25  Nathan Sidwell  <>

	* class.c (build_vbase_offset_vbtl_entries): Look for
	non-primary base of which we are a sub vtable.

2001-07-24  Phil Edwards  <>

	* semantics.c (finish_this_expr):  Remove unused code.

2001-07-24  Nathan Sidwell  <>

	Simplify rtti, now we've only one ABI.
	* cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
	(tinfo_decl_id, tinfo_var_id): Remove.
	(get_typeid_1): Remove.
	* rtti.c
	(init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
	(typeid_ok_p): New function.
	(build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
	(get_tinfo_decl): Remove old abi documentation.
	(tinfo_from_decl): Remove.
	(get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
	(get_typeid_1): Remove.
	(get_base_offset): Remove.
	(synthesize_tinfo_var): Absorb get_base_offset.
	(create_real_tinfo_var): Don't use tinfo_decl_id.

2001-07-23  Graham Stott  <>

	* cp/class.c (type_requires_array_cookie): Fix use of uninitialized
	variable has_two_argument_delete_p.

2001-07-21  Nathan Sidwell  <>

	Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
	* cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
	(delta2_identifier): Remove.
	(index_identifier): Remove.
	(pfn_or_delta2_identifier): Remove.
	(flag_vtable_thunks): Remove.
	(vfunc_ptr_type_node): Adjust.
	(build_vfn_ref): Lose first parameter.
	(fixup_all_virtual_upcast_offsets): Remove.
	* decl.c (initialize_predefined_identifiers): Remove
	delta2_identifier, index_identifier, pfn_or_delta2_identifier.
	(init_decl_processing): Remove no-vtable-thunk code.
	* decl2.c (flag_vtable_thunks): Remove.
	(mark_vtable_entries): Remove no-vtable-thunk code.
	* error.c (dump_decl): Remove no-vtable-thunk code.
	(dump_expr): Adjust ptr to member function code.
	* init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
	* rtti.c (build_headof): Remove no-vtable-thunk code.
	(get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
	* search.c (get_base_distance): Remove expand_upcast_fixups case.
	(virtual_context) Remove.
	(expand_upcast_fixups): Remove.
	(fixup_virtual_upcast_offsets): Remove.
	(fixup_all_virtual_upcast_offsets): Remove.
	* typeck.c (get_member_function_from_ptrfunc): Remove
	no-vtable-thunk code.
	* call.c (build_over_call): Adjust call to build_vfn_ref.
	* class.c (build_vfn_ref): Lose first parameter. Remove
	no-vtable-thunk code.
	(build_rtti_vtbl_entries): Remove no-vtable-thunk code.
	(build_vtable_entry): Remove no-vtable-thunk code.

2001-07-20  Nathan Sidwell  <>

	Remove old-abi remnants. Remove comments about old abi
	behavior. Remove references to 'new-abi' in comments.
	* cp-tree.h: Adjust comments.
	(vbase_offsets_in_vtable_p): Delete.
	(vcall_offsets_in_vtable_p): Delete.
	(vptrs_present_everywhere_p): Delete.
	(all_overridden_vfuns_in_vtables_p): Delete.
	(merge_primary_and_secondary_vtables_p): Delete.
	(init_vbase_pointers): Remove.
	* class.c: Adjust coments.
	(build_vbase_pointer_fields): Delete.
	(build_vbase_pointer): Remove old-abi code.
	(build_secondary_vtable): Likewise.
	(modify_all_vtables): Likewise.
	(create_vtable_ptr): Likewise.
	(layout_class_type): Likewise.
	(finish_struct_1): Likewise.
	(finish_vtbls): Likewise.
	(dfs_finish_vtbls): Delete.
	(build_vbase_offset_vtbl_entries): Remove old-abi code.
	* cvt.c: Adjust comments.
	* decl.c: Adjust comments.
	* decl2.c: Adjust comments.
	* init.c: Adjust comments.
	(construct_virtual_bases): Remove old-abi code.
	* lang-specs.h: Remove -fno-new-abi.
	* mangle.c: Adjust comments.
	* rtti.c: Adjust comments.
	(get_base_offset): Remove old-abi-code.
	* search.c: Adjust comments.
	(dfs_init_vbase_pointers): Remove.
	(dfs_vtable_path_unmark): Remove.
	(init_vbase_pointers): Remove.
	* semantics.c: Adjust comments.
	(emit_associated_thunks): Remove old-abi code.
	* typeck.c: Adjust comments.

2001-07-20  Daniel Berlin  <>

	* (cp/optimize.o): Depend on $(PARAMS_H), not

2001-07-19  Mark Mitchell  <>

	* class.c (finish_struct_anon): Forbid nested classes.

2001-07-19  Neil Booth  <>

	* decl2.c: Don't include dwarfout.h and dwarf2out.h.
	* optimize.c: Include debug.h.
	(maybe_clone_body): Use debug hook.
	* semantics.c: Include debug.h.
	(expand_body): Use debug hook.

2001-07-19  Neil Booth  <>

	* spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.

2001-07-18  Mark Mitchell  <>

	* class.c (type_requires_array_cookie): New function.
	(check_methods): Don't try to figure out whether the type needs a
	cookie here.
	(check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
	* cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
	* pt.c (instantiate_class_template): Don't set
	* NEWS: Document ABI changes from GCC 3.0.

2001-07-18  Xavier Delacour <>,
	    Gerald Pfeifer  <>

	* NEWS (Changes in GCC 3.0): Fix typo.

2001-07-13  Joseph S. Myers  <>

	* decl2.c (cplus_decl_attributes): Take a pointer to the node to
	which attributes are to be attached, and a flags argument.  Update
	call to decl_attributes.
	(grokfield): Update call to decl_attributes.
	* class.c (finish_struct): Update call to cplus_decl_attributes.
	* cp-tree.h (cplus_decl_attributes): Update prototype.
	* decl.c (start_decl, grokdeclarator, start_function): Update
	calls to decl_attributes and cplus_decl_attributes.
	* friend.c (do_friend): Update call to cplus_decl_attributes.
	* parse.y (parse_bitfield): Update call to cplus_decl_attributes.

2001-07-12  Mark Mitchell  <>

	* decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
	for `register' variables with an asm-specification.

2001-07-11  Mark Mitchell  <>

	* semantics.c (finish_asm_stmt): Mark the output operands
	to an asm addressable, if necessary.

2001-07-11  Ben Elliston  <>

	* Revert this change -- there is a subtle bug.

	PR c++/80
	* decl.c (finish_enum): New "attributes" argument; pass it to
	cplus_decl_attributes.  Use a narrower type if the enum is packed.
	* cp-tree.h (finish_enum): Adjust prototype.
	* parse.y (enum_head): New non-terminal.
	(structsp): Use it. Enums now may be preceded or followed by
	optional attributes -- pass their chained tree to finish_enum().
	* pt.c (tsubst_enum): Pass NULL_TREE for the new argument.

2001-07-10  Mark Mitchell  <>

	* pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope

2001-07-10  Jason Merrill  <>

	* semantics.c (cp_expand_stmt): Fix for null

2001-07-10  Jan van Male  <>

	* call.c (build_op_delete_call): Initialize fn.
	(convert_like_real): Delete conditional.
	(joust): Initialize *w and *l.
	* class.c: Add prototype for binfo_ctor_vtable.
	(get_primary_binfo): Initialize result.
	* init.c (build_java_class_ref): Initialize name.

2001-07-09  Erik Rozendaal  <>

	* typeck.c (unary_complex_lvalue): Do not duplicate the
	argument to modify, pre-, or post-increment when used as an
	lvalue and when the argument has side-effects.

2001-07-08  Joseph S. Myers  <>

	* decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
	(start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
	cplus_decl_attributes even if attrs is NULL.
	* friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.

2001-07-08  Joseph S. Myers  <>

	* decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
	calls to decl_attributes.

2001-07-06  Ira Ruben   <>

	* cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should

2001-07-05  Kriang Lerdsuwanakij  <>

	* cp-tree.h (copy_template_template_parm): Rename to ...
	(bind_template_template_parm): ... here.
	* tree.c (copy_template_template_parm): Rename to ...
	(bind_template_template_parm): ... here.  Remove the case when
	(copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
	* pt.c (lookup_template_class): Adjust.

2001-07-05  Jason Merrill  <>

	* cvt.c (convert_lvalue): New fn.
	* cp-tree.h: Declare it.
	* method.c (do_build_assign_ref): Use it.
	(do_build_copy_constructor): Convert parm to base types
	before calling base constructors.

	* typeck.c (check_return_expr): Check DECL_ALIGN instead of
	DECL_USER_ALIGN.  Check flag_elide_constructors instead of
	* semantics.c (cp_expand_stmt): Don't destroy the named return value.

2001-07-02  Nathan Sidwell  <>

	* optimize.c (optimize_inline_calls): New function, broken out
	of ...
	(optimize_function): ... here. Call it. Don't inline if it is
	a thunk.
	(dump_function): Print name of dump flag causing this dump.
	* semantics.c (expand_body): Move thunk inline check to

2001-06-29  Joseph S. Myers  <>

	* typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
	(comptypes): Use target.comp_type_attributes.

2001-06-29  Nathan Sidwell  <>

	* cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.

2001-06-28  Gabriel Dos Reis  <>

	* error.c (lang_print_error_function): Add a `diagnostic_context *'
	parameter. Tweak.

2001-06-27  Neil Booth  <>

	* decl2.c (import_export_class): Update.

2001-06-26  Gabriel Dos Reis  <>

	* error.c (init_error): Adjust settings.

2001-06-26  Gabriel Dos Reis  <>

	* error.c (init_error): Adjust settings.

2001-06-19  Richard Sandiford  <>

	* except.c (initialize_handler_parm): Expect __cxa_begin_catch to
	return pointers to data members by reference rather than by value.

2001-06-18  Jason Merrill  <>

	Implement the Named Return Value optimization.
	* cp-tree.h (struct cp_language_function): Add x_return_value.
	(current_function_return_value): Now a macro.
	* decl.c: Don't define it.
	(define_label, finish_case_label): Don't clear it.
	(init_decl_processing): Don't register it with GC.
	* semantics.c (genrtl_finish_function): Don't check it for
	no_return_label.  Copy the RTL from the return value to
	current_function_return_value and walk, calling...
	(nullify_returns_r): ...this new fn.
	* typeck.c (check_return_expr): Set current_function_return_value.

2001-06-15  Jason Merrill  <>

	* class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
	sharing a ctor vtable with.  Merge code for cases 1 and 2.
	(binfo_ctor_vtable): New fn.
	(build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.

2001-06-14  Jason Merrill  <>

	* class.c (dfs_find_final_overrider): Fix logic.

	* class.c (update_vtable_entry_for_fn): Uncomment optimization to use
	virtual thunk instead of non-virtual.
	(get_matching_virtual): Uncomment.

	* pt.c (unify): Don't recurse between the POINTER_TYPE and the
	OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
	PARM, not ARG.

2001-06-14  Nathan Sidwell  <>

	* class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
	we've not emerged from the hierarchy of RTTI_BINFO on reaching
	a non-virtual base.

2001-06-13  Mark Mitchell  <>

	* NEWS: Update release number.

2001-06-12  Nathan Sidwell  <>

	PR c++/3130, c++/3131, c++/3132
	* cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
	* class.c (force_canonical_binfo_r): Move
	virtual bases unless they're primary and what they're primary
	too has been moved.
	(dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
	with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
	BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
	derived binfo.
	(mark_primary_bases): Use BINFO_UNSHARED_MARKED.
	(layout_nonempty_base_or_field): Add most derived type
	parameter. Adjust.
	(layout_empty_base): Likewise.
	(build_base_field): Likewise.
	(build_base_fields): Likewise.
	(propagate_binfo_offsets): Add most derived type
	parameter. Skip non canonical virtual bases too.
	(dfs_set_offset_for_unshared_vbases): Don't skip primary
	bases. Do skip canonical bases.
	(layout_virtual_bases): Adjust.
	(layout_class_type): Adjust.
	(dfs_get_primary_binfo): Build list of virtual primary base
	(get_primary_binfo): Check that the shared virtual primary
	base candidate was found first.
	(accumulate_vtbl_inits): Don't do anything for non-vptr
	containing binfos. For case 1 primary virtual bases, keep
	checking that we've not emerged from the hierarchy of RTTI_BINFO.

2001-06-12  Nathan Sidwell  <>

	PR c++/3089
	* class.c (dfs_accumulate_vtbl_inits): Always walk down the
	hierarchy looking for primary bases for a ctor
	vtable. Recursively call oneself, if we meet our primary via
	this route and haven't met it yet via inheritance graph order.

2001-06-11  Mark Mitchell  <>

	* lang-options.h: Emit documentation for -fno-honor-std, not

2001-06-10  Alexandre Oliva  <>

	* typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
	Don't clobber delta.
	(expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.

2001-06-10  Mark Mitchell <>
	    Gabriel Dos Reis  <>

	* (cp/call.o): Depend on diagnostic.h
	(cp/typeck.o): Depend on diagnostic.h
	(cp/typeck2.o): Depend on diagnostic.h
	(cp/repo.o): Depend on dignostic.h
	* typeck.c: #include diagnostic.h
	(convert_for_initialization): Remove extern declaration for
	warningcount and errorcount.

	* call.c: #include diagnostic.h
	(convert_like_real): Remove extern declaration for warnincount and

	* repo.c: #include diagnostic.h
	* typeck2.c: #include diagnostic.h

2001-06-08  Nathan Sidwell  <>

	* decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
	in previous change.

2001-06-08  Nathan Sidwell  <>

	PR c++/2929
	* friend.c (do_friend): Use push_decl_namespace for classes at
	namespace scope.

2001-06-08  Nathan Sidwell  <>
	    Jason Merrill <>

	PR c++/3061
	* class.c (build_secondary_vtable): Use assert, rather than an error
	(dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
	(dfs_accumulate_vtbl_inits): A lost primary virtual base may
	be between ORIG_BINFO and RTTI_BINFO, but neither of them.
	Don't set BINFO_VTABLE for a primary virtual base.

2001-06-07  Mark Mitchell  <>

	* decl.c (duplicate_decls): Update source position information
	when a template function is defined.

2001-06-07  Phil Edwards  <>

	* lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.

2001-06-07  Nathan Sidwell  <>

	PR c++/2914
	* decl.c (pushtag): Don't push into a complete type's scope.

2001-06-06  Jason Merrill  <>

	* cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
	(struct lang_decl_flags): Lose generate_with_vtable_p.
	* class.c (copy_virtuals): Adjust.
	* decl2.c (mark_vtable_entries): Adjust.
	* method.c (make_thunk, build_vtable_entry): Adjust.
	* class.c (update_vtable_entry_for_fn): Only look as far as the
	first defining class.
	(build_vtbl_initializer): Put nothing in the slot for a function only
	defined in a lost primary virtual base.
	(add_vcall_offset_vtbl_entries_1): Use the same code for
	the lost primary case and the normal case.
	(dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
	(get_vfield_offset, get_derived_offset): Lose.
	(dfs_find_final_overrider): Use look_for_overrides_here.
	(get_matching_virtual): New fn.
	* semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
	* search.c (look_for_overrides_here): Split out from...
	(look_for_overrides_r): Here.

	* class.c (find_final_overrider): Return error_mark_node on error.

	* decl2.c (key_method): #if 0 accidental change.

2001-06-06  John David Anglin  <>

	* call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
	(build_over_call): Likewise.
	* decl.c (grokparms): Likewise.
	* pt.c (tsubst_decl): Likewise.
	* typeck.c (convert_arguments): Likewise.

2001-06-05  Mark Mitchell  <>

	* semantics.c (begin_class_definition): Robustify.

	* pt.c (instantiate_decl): Tell the repository code about the
	clones, not the cloned functions.
	* repo.c (repo_template_used): Explicitly instantiate the cloned
	function, not the clones.

2001-06-05  Nathan Sidwell  <>

	* call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
	ICS_BAD_FLAG on created conversion.
	(compare_ics): Break out rank.

2001-06-05  Nathan Sidwell  <>

	* decl.c (xref_tag): Remove extraneous %s on dependent name
	lookup warning.

2001-06-05  Nathan Sidwell  <>

	* class.c (layout_vtable_decl): Fix off by one error on
	(build_vtt): Likewise.
	(build_ctor_vtbl_group): Likewise.

2001-06-05  Nathan Sidwell  <>

	* class.c (maybe_indent_hierarchy): New function.
	(dump_class_hierarchy_r): Add flags. Dump extra binfo
	information, if enabled. Use maybe_indent_hierarchy. Adjust
	output format.
	(dump_class_hierarchy): Adjust prototype. Adjust output format.
	(dump_array, dump_vtable, dump_vtt): New functions.
	(finish_struct_1): Adjust hierarchy dumping.
	(initialize_vtable): Call dump_vtable.
	(build_vtt): Call dump_vtt.
	(build_ctor_vtbl_group): Call dump_vtable.
	* decl2.c (flag_dump_class_layout): Remove.
	(cxx_decode_option): Remove dump translation unit
	and dump class hierarchy check. Call dump_switch_p.
	(finish_file): Adjust dumping.
	(dump.c): Only dump base classes if not TDF_SLIM.
	Only dump namespace members if not TDF_SLIM.
	* optimize.c (dump_function): New function.
	(optimize_function): Call dump_function.
	* semantics.c (expand_body): Use dump_enabled_p.

2001-06-01  Nathan Sidwell  <>

	PR g++/2936
	Part missed from first commit
	* decl2.c (finish_anon_union): Copy context.

2001-05-30  Nathan Sidwell  <>

	PR g++/2936
	* optimize.c (remap_decl): Remap anonymous aggregate members too.

2001-05-26  Nathan Sidwell  <>

	PR g++/2823
	* semantics.c (expand_body): Don't optimize thunks.

2001-05-25  Sam TH  <>

	* cp-tree.h lex.h: Fix header include guards.

2001-05-25  Mark Mitchell <>

	* decl.c (init_decl_processing): Tweak.

2001-05-24  Mark Mitchell  <>

	* decl.c (duplicate_decls): Tidy.
	(init_decl_processing): Always set flag_no_builtin.

2001-05-24  Nathan Sidwell  <>

	PR c++/2184
	* decl2.c (do_local_using_decl): Push the decls, even in a

2001-05-22  Mark Mitchell  <>

	* optimize.c (initialize_inlined_parameters): Don't set
	TREE_READONLY for a VAR_DECL taking the place of an inlined

2001-05-22  Jason Merrill  <>

	* class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
	* tree.c (cp_valid_lang_attribute): Warn about use of com_interface

2001-05-22  Joseph S. Myers  <>

	* parse.y: Refer to compound literals as such, not as

2001-05-21  Mark Mitchell  <>

	* call.c (build_op_delete_call): Ignore exception-specifications
	when looking for matching delete operators.
	* init.c (build_new_1): Compute whether or not the allocation
	function used is a placement allocation function or not, and
	communicate this information to build_op_delete_call.

2001-05-21  Jason Merrill  <>

	* class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
	(build_vtbl_ref): Adjust.
	(dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
	* decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
	Re-add vtable-gc.
	(unsupported_options): Correspondingly.

	* decl2.c (maybe_make_one_only): Check flag_weak, not

	* cp-tree.def (START_CATCH_STMT): Lose.
	* dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
	* tree.c (cp_statement_code_p): Don't case it.
	* semantics.c (cp_expand_stmt): Likewise.
	* cp-tree.h (START_CATCH_TYPE): Lose.
	* except.c (expand_start_catch_block): Don't start any blocks.
	Return the type.
	(expand_end_catch_block): Don't end any blocks.
	* parse.y (handler): Don't pass anything from finish_handler_parms
	to finish_handler.
	* pt.c (tsubst_expr): Likewise.
	* semantics.c (begin_handler): Call note_level_for_catch here.
	(finish_handler_parms): Don't return anything.
	(genrtl_catch_block, begin_catch_block): Lose.
	(genrtl_handler): Call expand_start_catch here.

2001-05-18  Jason Merrill  <>

	* class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
	(get_vtable_decl, build_vtt): Not here.

2001-05-20  Nathan Sidwell  <>

	PR c++/2781
	* optimize.c (update_cloned_parm): Copy addressability and other

2001-05-20  Kriang Lerdsuwanakij  <>

	* pt.c (determine_specialization): Ignore artificial functions.

2001-05-20  Neil Booth  <>

	* cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
	(C_RID_CODE): Remove.
	* lex.c (cxx_init_options): Call set_identifier_size.  Update.
	(init_parse): Don't do it here.

2001-05-18  Diego Novillo  <>

	* decl2.c (finish_objects): Use the original SYMBOL_REF from the
	function declaration to avoid stripping the symbol's attributes.

2001-05-18  Nathan Sidwell  <>

	* decl.c (pushdecl): Adjust error string.
	(xref_tag): Adjust friend class injection warning. Remove the
	inherited name from the class shadowed scope.

2001-05-17  Mark Mitchell  <>

	* except.c (cp_protect_cleanup_actions): New function.
	(init_exception_processing): Don't set protect_cleanup_actions
	here.  Do set lang_protect_cleanup_actions.

2001-05-16  Nathan Sidwell  <>

	* spew.c (read_token): Call yyerror on all unexpected tokens.

2001-05-16  Nathan Sidwell  <>

	* init.c (member_init_ok_or_else): Take a tree rather than
	string for name.
	(expand_member_init): Adjust.

2001-05-14  Nick Clifton  <>

	* decl.c (duplicate_decls): Suppress warning about duplicate
	decls if the first decl is a friend.

2001-05-12  Zack Weinberg  <>

	* except.c (choose_personality_routine): Export.  Add
	explanatory comment.  Take an enum languages, not a boolean.
	(initialize_handler_parm): Adjust to match.
	* cp-tree.h: Prototype choose_personality_routine.
	* lex.c (handle_pragma_java_exceptions): New function.
	(init_cp_pragma): Register #pragma GCC java_exceptions.

2001-05-12  Neil Booth  <>

	* method.c (build_mangled_C99_name): Remove unused prototype.

2001-05-12  Alexandre Oliva  <>

	* cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
	* typeck.c (get_member_function_from_ptrfunc,
	build_ptrmemfunc, expand_ptrmemfunc_cst): Take

	Reverted Geoff Keating's 2001-05-03's patch.

2001-05-11  Ira Ruben	<>

	* cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.

2001-05-11  Neil Booth  <>

	* cp-tree.h (finish_label_expr, lookup_label): Delete.
	* parse.y: Update for '&&'; don't issue warning here.
	* semantics.c (finish_label_expr): Delete.

2001-05-07  Mark Mitchell  <>

	* splay-tree.h (splay_tree_max): New function.
	(splay_tree_min): Likewise.

2001-05-03  Geoffrey Keating  <>

	* cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
	(pfn_vflag_identifier): Define.
	Update comment about layout of pointer functions.
	(build_ptrmemfunc1): Update prototype.
	(expand_ptrmemfunc_cst): Update prototype.
	* decl.c (initialize_predefined_identifiers): Initialize
	(build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
	an extra field to the type.
	* expr.c (cplus_expand_constant): Pass 'flag' between
	expand_ptrmemfunc_cst and build_ptrmemfunc1.
	* typeck.c (get_member_function_from_ptrfunc): When
	FUNCTION_BOUNDARY < 16, look at additional field to determine
	if a pointer-to-member is a real pointer or a vtable offset.
	(build_ptrmemfunc1): Add new parameter to contain extra field.
	(build_ptrmemfunc): Pass the extra field around.
	(expand_ptrmemfunc_cst): Add new parameter to return extra field.
	(pfn_from_ptrmemfunc): Ignore the extra field.

2001-05-03  Mark Mitchell  <>

	* cp-tree.h (flag_inline_trees): Update documentation.
	* decl.c (init_decl_processing): Adjust handling of
	flag_inline_functions and flag_inline_trees to support -O3.
	(grokfndecl): Set DECL_INLINE on all functions if that's what
	the user requested.
	(save_function_data): Clear DECL_INLINE in
	current_function_cannot_inline is non-NULL.
	* decl2.c (flag_inline_trees): Update documentation.

2001-05-03  Nathan Sidwell  <>

	* dump.c (cp_dump_tree, USING_STMT case): New case.
	* tree.c (cp_statement_code_p): Add USING_STMT.
	* decl2.c (do_using_directive): Add the using directive statement.

	* tree.c (walk_tree): Reformat an if block.

2001-05-02  Mark Mitchell  <>

	* decl.c (compute_array_index_type): Don't try to do anything with
	the indices when processing a template.

2001-05-02  Kaveh R. Ghazi  <>

	* call.c: NULL_PTR -> NULL.
	* class.c: Likewise.
	* cvt.c: Likewise.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* except.c: Likewise.
	* init.c: Likewise.
	* rtti.c: Likewise.
	* search.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.
	* typeck2.c: Likewise.

2001-05-02  Mark Mitchell  <>

	* decl2.c (do_using_directive): Revert previous patch.

2001-05-01  Nathan Sidwell  <>

	* cp-tree.def (USING_STMT): New statement node.
	* cp-tree.h (USING_STMT_NAMESPACE): New macro.
	* decl2.c (do_using_directive): Add USING_STMT to statement
	tree. Don't emit errors when processing template decl.
	* pt.c (tsubst_expr, USING_STMT case): New case.
	* semantics.c (cp_expand_stmt, USING_STMT case): New case.

2001-05-01  Nathan Sidwell  <>

	* call.c (build_new_op): Convert args from reference here.
	(build_conditional_expr): Don't convert here.

2001-05-01  Nathan Sidwell  <>

	* spew.c (last_token_id): New static variable.
	(read_token): Set it here.
	(yyerror): Use it here.

2001-04-30  Richard Henderson  <>

	* cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
	* decl.c: Likewise.

2001-04-30  Mark Mitchell  <>

	* gxxint.texi: Remove.
	* Remove all traces of gxxint.texi.

Mon Apr 30 16:14:10 2001  Mark P Mitchell  <>

	* decl2.c (start_static_initialization_or_destruction): Correct
	logic to handle the -fno-use-cxa-atexit case.

2001-04-30  Mark Mitchell  <>

	* optimize.c (update_cloned_parm): New function.
	(maybe_clone_body): Use it.  Update the `this' parameter too.

2001-04-29  Joseph S. Myers  <>

	* decl2.c (unsupported_options): Add new-abi.
	* lang-options.h: Remove no longer supported options.

2001-04-27  Nathan Sidwell  <>

	* except.c (can_convert_eh): Don't check template parms,
	typename types etc.

2001-04-27  Nathan Sidwell  <>

	* optimize.c (maybe_clone_body): Copy parameter names and locations.

2001-04-27  Nathan Sidwell  <>

	* cp-tree.h (adjust_clone_args): Prototype new function.
	* class.c (adjust_clone_args): New function.
	* decl.c (start_function): Call it for in charge ctors.

2001-04-26  Mark Mitchell  <>

	* method.c (use_thunk): Make sure that thunks really are emitted
	when requested.

2001-04-26  Nathan Sidwell <>

	* mangle.c (write_chars): New macro.
	(hwint_to_ascii): New function
	(write_number): Use it.
	(write_integer_cst): Deal with really big numbers.

2001-04-25  Mark Mitchell  <>

	* optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
	the clone.

2001-04-25  Nathan Sidwell  <>

	* decl.c (grokdeclarator): Set context of namespace scope

2001-04-24  Zack Weinberg  <>

	* cp/optimize.c: Include hashtab.h.
	(struct inline_data): Add tree_pruner.
	(expand_call_inline, expand_calls_inline): Use it when calling
	(optimize_function): Initialize and free tree_pruner.

2001-04-24  Nathan Sidwell <>

	Lazy __FUNCTION__ generation.
	* cp-tree.def (FUNCTION_NAME): Remove.
	* cp-tree.h (function_name_declared_p): Remove.
	(cp_fname_init): Prototype.
	* decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
	don't call declare_function_name. Call start_fname_decls.
	(cp_make_fname_decl): Adjust parameters. Generate the name. Don't
	clobber the line number.
	(cp_fname_init): New function.
	(start_function): Call start_fname_decls.
	(finish_function): Call finish_fname_decls.
	* lex.c (reswords): Add slots for __FUNCTION__ et al.
	(rid_to_yy): Add mappings for __FUNCTION__ et al.
	* optimize.c (maybe_clone_body): Remove function_name_declared_p.
	* parse.y (VAR_FUNC_NAME): New token.
	(primary): Add VAR_FUNC_NAME.
	* pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
	(tsubst, FUNCTION_NAME case): Remove.
	(tsubst_copy, FUNCTION_NAME case): Remove.
	(tsubst_expr, DECL_STMT case): Be careful with a
	(instantiate_decl): Remove function_name_declared_p.
	* semantics.c (begin_compound_statement): Don't call
	declare_function_name here.
	(setup_vtbl_ptr). Don't save & restore function_name_declared_p.
	(finish_translation_unit): Call finish_fname_decls.
	(expand_body): Remove function_name_declared_p.
	* typeck2.c (digest_init): Allow any ERROR_MARK.

2001-04-24  Nathan Sidwell  <>

	* pt.c (tsubst_decl): Use VOID_TYPE_P.
	* semantics.c: Fix some typos.

2001-04-23  Phil Edwards  <>

	* cp/decl2.c (flag_honor_std):  Always initialize to 1.

2001-04-22  Kaveh R. Ghazi  <>

	* xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.

2001-04-23  Jason Merrill  <>

	* except.c (build_throw): Wrap the initialization of the exception
	object in a MUST_NOT_THROW_EXPR.
	(do_free_exception): #if 0.

2001-04-20  Mark Mitchell  <>

	* cp-tree.h (finish_enum): Change prototype.
	* decl.c (finish_enum): Reorganize.
	* parse.y (structsp): Adjust calls to finish_enum.

2001-04-20  Nathan Sidwell  <>

	* tree.c (cp_tree_equal): Adjust final switch formatting. Add
	't' case.

2001-04-20  Nathan Sidwell  <>

	* class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
	(layout_empty_base): Return at end flag.
	(build_base_field): Likewise.
	(build_base_fields): Likewise.
	(layout_virtual_bases): Don't add 1 to eoc value.
	(end_of_class): Use full size for empty bases.
	(layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
	empty bases. Don't add 1 to eoc value. Only add trailing padding
	if we're an empty class with no empty bases.
	(dump_class_hierarchy): Dump size and alignment.

2001-04-20  Jakub Jelinek  <>

	* call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and

2001-04-20  Jakub Jelinek  <>

	* search.c (lookup_field_r): If looking for type and non-TYPE_DECL
	is found, look first if name does not match the structure name.

2001-04-19  Mark Mitchell  <>

	* cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
	(SET_DECL_LANGUAGE): New macro.
	* decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
	(pushdecl): Likewise.
	(build_library_fn_1): Likewise.
	(build_cp_library_fn): Likewise.
	(grokfndecl): Likewise.
	(grokvardecl): Mark `extern "C"' variables as having C linkage.
	* decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
	* lex.c (retrofit_lang_decl): Likewise.
	* mangle.c (mangle_decl_string): Don't mangle the names of
	variables declared with C language linkage.
	* semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.

2001-04-18  John David Anglin  <>

	* semantics.c (simplify_aggr_init_exprs_r): Don't restore
	flag_access_control from uninitialized storage.

2001-04-15  Mark Mitchell  <>

	* cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
	* mangle.c (write_pointer_to_member_type): Fix mangling of
	pointers to cv-qualified member function types.

	* init.c (build_delete): Create a SAVE_EXPR for the address if
	we're going to use it more than once.

2001-04-13  Mark Mitchell  <>

	* cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
	(expand_ptremfunc_cst): Change prototype.
	(delta2_from_ptrmemfunc): Remove.
	* expr.c (cplus_expand_constant): Adjust call to
	* typeck.c (build_ptrmemfunc1): Simplify.
	(build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
	results in a constant.
	(expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
	(delta2_from_ptrmemfunc): Remove.
	(pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.

2001-04-12  Jason Merrill  <>

	* cp-tree.h (decl_namespace_list): New macro.
	(struct saved_scope): Add decl_ns_list.
	* decl.c (mark_saved_scope): Mark it.
	* decl2.c: Lose static decl_namespace_list.
	(init_decl2): Don't save it.

2001-04-12  Kaveh R. Ghazi  <>

	* cp-tree.h (warn_return_type, yylex): Delete redundant

	* decl.c (current_class_depth, global_namespace): Likewise.

	* decl2.c (current_class_depth, flag_gnu_xref): Likewise

	* repo.c (flag_use_repository): Likewise.

2001-04-12  Kaveh R. Ghazi  <>

	* cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
	set_block, pushdecl, getdecls, gettags, init_decl_processing,
	maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
	lvalue_or_else, print_lang_statistics, comp_target_types,
	unsigned_type, signed_type, signed_or_unsigned_type,
	build_function_call, mark_addressable, incomplete_type_error):
	Delete redundant declarations.

2001-04-11  Jason Merrill  <>

	* cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
	(TYPE_ANONYMOUS_P): New macro.
	(TAGGED_TYPE_P): New macro.
	* decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
	(grokfndecl, grokvardecl, grokdeclarator): Likewise.
	* tree.c (no_linkage_helper): Likewise.
	* semantics.c (begin_class_definition): Likewise.
	* pt.c (convert_template_argument): Likewise.
	* lex.c (check_for_missing_semicolon): Likewise.

2001-04-12  Nathan Sidwell  <>

	* class.c (dfs_unshared_virtual_bases): New function.
	(mark_primary_bases): Call it.
	(check_bases): Ignore virtual bases when determining

2001-04-12  Nathan Sidwell  <>

	* method.c (make_thunk): Clear DECL_CLONED_FUNCTION.

2001-04-11  Mark Mitchell  <>

	* optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
	cloned function to the clone.

2001-04-11  Kaveh R. Ghazi  <>

	* (cp/semantics.o): Depend on $(EXPR_H).

	* semantics.c: Include expr.h.

2001-04-11  Nathan Sidwell  <>

	* method.c (implicitly_declare_fn): Commonize code for copy ctor
	and assignment op. Set TREE_USED for parameter.

2001-04-10  Mark Mitchell  <>

	* class.c (find_final_overrider_data): Add `candidates'.
	(dfs_find_final_overrider): Don't issue error messages
	(find_final_overrider): Issue error messages here.
	(build_base_field): Don't warn about amgibuous direct bases here.
	(warn_about_ambiguous_direct_bases): New function.
	(layout_class_type): Use it.

2001-04-10  Richard Henderson  <>

	* typeck.c (build_array_ref): Push the array reference inside

2001-04-05  Mark Mitchell  <>

	* decl.c (duplicate_decls): Adjust accordingly.
	(maybe_commonize_var): Likewise.
	(grokfndecl): Likewise.
	(start_function): Likewise.
	(start_method): Likewise.
	* decl2.c (key_method): Likewise.
	(import_export_decl): Likewise.
	* method.c (implicitly_declare_fn): Likewise.
	* optimize.c (maybe_clone_body): Likewise.

2001-04-05  Benjamin Kosnik  <>

	* lang-specs.h: Add __DEPRECATED.

Thu Apr  5 16:54:29 2001  J"orn Rennecke <>

	* search.c (get_dynamic_cast_base_type): When building a new
	constant, set its type to ssizetype.

2001-04-04  Jakub Jelinek  <>

	* optimize.c (expand_call_inline): Only add newly inlined statements
	into inlined_stmts.

2001-04-03  Mark Mitchell  <>

	* cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
	* operators.def: Remove old name-mangling information.
	* decl.c (grok_op_properties): Adjust accordingly.
	* lex.c (init_operators): Likewise.
	* rtti.c (get_tinfo_decl): Issue error messages about types that
	have variable size.

2001-04-03  Mark Mitchell  <>

	* decl2.c (import_export_decl): Don't call import_export_class
	when processing an inline member function.
	* semantics.c (expand_body): Call import_export_decl before
	emitting inline functions.

2001-03-28  Richard Henderson  <>

	IA-64 ABI Exception Handling:
	* cp-tree.def (EH_SPEC_BLOCK): New.
	* cp-tree.h: Update changed function declarations.
	(struct cp_language_function): Rename x_eh_spec_try_block
	to x_eh_spec_block.
	* decl.c (current_binding_level): If no current function
	bindings, revert to scope_chain.
	(initialize_predefined_identifiers): Remove __cp_push_exception.
	(store_parm_decls): Use begin_eh_spec_block.
	(finish_function): Use finish_eh_spec_block.
	(mark_lang_function): Update for name changes.
	* decl2.c (finish_file): No mark_all_runtime_matches.
	* dump.c (cp_dump_tree): Handle new tree codes.
	* error.c (dump_expr) [BIND_EXPR]: Fix typo.
	* except.c (catch_language_init, catch_language): Remove.
	(init_exception_processing): Don't set language code.
	Initialize call_unexpected_node, protect_cleanup_actions,
	eh_personality_libfunc, lang_eh_runtime_type.
	(call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
	(get_eh_type, get_eh_caught, get_eh_handlers): Remove.
	(prepare_eh_type): Split out type canonicalizations ...
	(build_eh_type_type): ... from here.
	(build_eh_type_type_ref): Remove.
	(mark_all_runtime_matches): Remove.
	(build_exc_ptr): New.
	(do_begin_catch, do_end_catch): New.
	(do_pop_exception): Remove.
	(build_terminate_handler): Remove.
	(choose_personality_routine): Split out language choice from ...
	(initialize_handler_parm): ... here.
	(expand_start_catch_block): Use do_begin_catch.  Simplify Java
	exception object handling.
	(expand_start_eh_spec, expand_end_eh_spec): Remove.
	(expand_exception_blocks, alloc_eh_object): Remove.
	(begin_eh_spec_block, finish_eh_spec_block): New.
	(do_allocate_exception, do_free_exception): New.
	(expand_throw): Merge into ...
	(build_throw): ... here.  Update for abi.
	* expr.c (cplus_expand_expr): No expand_internal_throw.
	* pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
	* semantics.c (*) Update for except.h name changes.
	(genrtl_try_block): No protect_with_terminate.
	(genrtl_eh_spec_block): New.
	(genrtl_handler): Don't emit the goto here.
	(cp_expand_stmt): Handle EH_SPEC_BLOCK.
	(genrtl_finish_function): Don't expand_exception_blocks.
	* tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.

2001-03-28  Richard Henderson  <>

	* decl.c (struct named_label_list): Rename eh_region to
	in_try_scope, add in_catch_scope.
	(struct binding_level): Rename eh_region to is_try_scope,
	add is_catch_scope.
	(note_level_for_try): Rename from note_level_for_eh.
	(note_level_for_catch): New.
	(poplevel): Copy both is_try_scope and is_catch_scope to
	the named_label_list struct.
	(check_previous_goto_1): Don't check for catch block via
	DECL_ARTIFICIAL; use in_try_scope instead.
	(check_goto): Likewise.
	* cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
	* except.c (expand_start_catch_block): Call note_level_for_catch.
	* semantics.c (begin_compound_stmt): Update for note_level_for_try.

2001-03-27  Richard Henderson  <>

	* except.c: Use USING_SJLJ_EXCEPTIONS instead of

2001-03-27  Phil Edwards  <>

	* pt.c (check_default_tmpl_args):  Make error messages clearer.

2001-03-26  Phil Edwards  <>

	* error.c:  Also undefine 'A' macro used for cp_printers definition.

2001-03-27  Kaveh R. Ghazi  <>

	* Depend on $(SYSTEM_H), not system.h.

2001-03-26  Mike Yang <>
	    Mark Mitchell  <>

	* dump.c (dump_access): New function.
	(cp_dump_tree): Use it.  Dump basetype information for class

2001-03-26  Mark Mitchell  <>

	* (optimize.o): Depend on params.h.
	(duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
	(init_decl_processing): Set flag_no_inline when doing
	* optimize.c: Include params.h.
	(struct inline_data): Improve documentation of FNS.  Add
	(INSNS_PER_STMT): New macro.
	(remap_block): Use CLONING_P.
	(inlinable_function_p): Don't inline big functions.
	(expand_call_inline): Keep track of how much inlining we've done.
	(optimize_function): Set FIRST_INLINED_FN.
	(maybe_clone_body): Set CLONING_P.
	* semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
	tree nodes.
	(genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
	rest_of_compilation.  Clear DECL_RTL for local variables
	(clear_decl_rtl): New function.

2001-03-26  Nathan Sidwell  <>

	Implement DR 209
	* cp-tree.h (skip_type_access_control,
	reset_type_access_control): Prototype.
	* decl.c (grokdeclarator): Access of friends is not checked.
	* parse.y (component_decl_list): Reset type access control.
	* semantics.c (decl_type_access_control): Clear
	(save_type_access_control): Don't save if not deferring.
	(skip_type_access_control, reset_type_access_control): New
	(begin_class_definition): Do type access control for basetypes.
	Start deferred access control.
	(finish_class_definition): Resume immediate access control if
	this is a local class.

2001-03-25  Kaveh R. Ghazi  <>

	* class.c (add_method): Use memcpy/memmove, not bcopy.

	* decl.c (duplicate_decls): Likewise.

2001-03-23  Jakub Jelinek  <>

	* mangle.c (write_discriminator): Use `_0' for discriminator 1,
	not `_'.

2001-03-23  Jakub Jelinek  <>

	* decl.c (local_names): Define.
	(push_local_name): New.
	(grok_reference_init): Return init if initializing static reference
	variable with non-constant instead of emitting it.
	Move expand_static_init call to cp_finish_decl.
	(layout_var_decl): Call push_local_name.
	(maybe_commonize_var): Allow inlining functions even if they have
	static local variables, use comdat_linkage for them if flag_weak.
	(check_initializer): Call obscure_complex_init if
	grok_reference_init returned nonzero.
	(save_function_data): Clear x_local_names.
	(pop_cp_function_context): Free x_local_names.
	(mark_inlined_fns): Remove.
	(mark_lang_function): Mark x_local_names.
	(lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
	Mark inlined_fns as tree, remove call to mark_inlined_fns.
	* class.c (alter_access): Ensure DECL_ACCESS is never set if
	* cp-tree.h (cp_language_function): Add x_local_names.
	(lang_decl_flags): Add discriminator into u2.
	(lang_decl_inlined_fns): Remove.
	(lang_decl): inlined_fns is now a TREE_VEC.
	* optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
	TREE_VEC, not a custom structure.
	(optimize_function): Likewise.
	* mangle.c (discriminator_for_local_entity): Discriminate among
	VAR_DECL local entities.
	* search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
	is not valid.

2001-03-22  Bryce McKinlay  <>

	Add support for Java interface method calls.
	* cp-tree.h (struct lang_type): Add java_interface flag.
	* tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
	* call.c (java_iface_lookup_fn): New static.
	(build_over_call): If calling a method declared in a
	TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
	expression which resolves the function address.
	(build_java_interface_fn_ref): New function.

2001-03-22  Richard Henderson  <>

	* (cp/except.o): Don't depend on insn-flags.h.
	* except.c: Don't include it.

2001-03-22  Gerald Pfeifer  <>
	    based on an idea from Joe Buck <>

	* parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
	New nonterminals.
	(data_def, component_decl): Add reductions to bad_decl.

2001-03-22  Jakub Jelinek  <>

	* method.c (do_build_assign_ref): Don't use build_modify_expr for
	anonymous aggregates, since they don't have assignment operator
	* decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
	assignment operators for anonymous structure fields.

2001-03-21  Jason Merrill  <>

	* pt.c (instantiate_decl): Abort if we see a member constant
	instantiation that doesn't already have its initializer.
	Downgrade explicit instantiation without definition to pedwarn.

	* cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
	* class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
	(import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.

	(pending_vtables): Remove.
	* decl2.c (pending_vtables): Remove.
	(import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
	(import_export_class): Likewise.
	(init_decl2): Don't mark pending_vtables.
	* lex.c (handle_pragma_vtable): Just sorry.
	* pt.c (instantiate_class_template): Don't mess with
	(mark_class_instantiated): Likewise.
	* ptree.c (print_lang_type): Don't print it.
	* semantics.c (begin_class_definition): Don't set it.

	* pt.c (template_tail): Replace with last_pending_template.
	(maybe_templates, maybe_template_tail): Remove.
	(add_pending_template): Adjust.
	(instantiate_pending_templates): Adjust.

	* cp-tree.h (struct saved_scope): Remove lang_stack field.
	(current_lang_stack): Remove.
	* decl.c (maybe_push_to_top_level): Don't initialize it.
	(duplicate_decls): Use current_lang_depth.
	(xref_basetypes): Likewise.
	* class.c (current_lang_depth): New fn.
	(push_lang_context): Use more varray functionality.
	(pop_lang_context): Likewise.

	* error.c (GLOBAL_THING): Always use '__'.

2001-03-21  Mark Mitchell  <>

	* class.c (build_clone): Clear DECL_ASSEMBLER_NAME.

	* mangle.c (mangle_decl_string): Mangle the names of overloaded
	operators, even when they have `extern "C"' linkage.

2001-03-19  Mark Mitchell  <>

	* class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
	where it's not necessary.
	(add_method): Remove optimization involving comparison of
	(build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
	where it's not necessary.
	(check_methods): Likewise.
	(build_clone): Likewise.
	(built_vtt): Likewise.
	* cp-tree.h (DECL_NEEDED_P): Likewise.
	* decl.c (pushtag): Likewise.
	(duplicate_decls): Likewise.
	(pushdecl): Likewise.
	(builtin_function): Likewise.
	(build_library_fn_1): Set DECL_LANGUAGE for library functions.
	(build_cp_library_fn): Likewise.
	(maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
	where it's not necessary.
	(make_rtl_for_nonlocal_decl): Likewise.
	(cp_finish_decl): Likewise.
	(grokfndecl): Likewise.
	(grokvardecl): Likewise.
	(grokdeclarator): Likewise.
	(start_function): Likewise.
	(cp_missing_return_ok_p): Likewise.
	* decl2.c (grokclassfn): Likewise.
	(check_classfn): Likewise.
	(finish_static_data_member_decl): Likewise.
	(grokfield): Likewise.
	* error.c (GLOBAL_IORD_P): Remove.
	(dump_global_iord): Improve output.
	(dump_decl): Avoid using DECL_ASSEMBLER_NAME.
	* except.c (nothrow_libfn_p): Summarily reject any function not in
	* init.c (build_java_class_ref): Don't explicitly set
	DECL_ASSEMBLER_NAME after calling mangle_decl.
	* mangle.c (mangle_decl_string): Handle extern "C" functions.
	(mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
	* method.c (set_mangled_name_for_decl): Don't explicitly set
	DECL_ASSEMBLER_NAME after calling mangle_decl.
	(make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
	* pt.c (set_mangled_name_for_template_decl): Remove.
	(check_explicit_specialization): Don't use it.
	(looup_template_class): Don't set DECL_ASSEMBLER_NAME.
	(tsubst_friend_function): Likewise.
	(tsubst_decl): Likewise.
	(regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
	* rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
	where it's not necessary.
	(tinfo_base_init): Likewise.
	(create_real_tinfo_var): Likewise.
	* search.c (looup_field_1): Likewise.
	* semantics.c (finish_named_return_value): Likewise.
	* tree.c (init_tree): Set lang_set_decl_assembler_name.

2001-03-15  Gabriel Dos Reis  <>

	Correct semantics restrictions checking in throw-expression.
	* except.c (is_admissible_throw_operand): New function.
	(build_throw): Use it.

2001-03-14  Mark Mitchell  <>

	* decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
	and its ilk.

2001-03-14  Mark Mitchell  <>

	* class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
	* cp-tree.h (DECL_IN_MEMORY_P): Likewise.
	* decl.c (duplicate_decls): Likewise.
	(builtin_function): Likewise.
	(build_library_fn): Likewise.
	(build_cp_library_fn): Likewise.
	(check_initializer): Likewise.
	(cp_finish_decl): Likewise.
	* decl2.c (grokfield): Likewise.
	(grok_function_init): Remove #if 0'd code.
	(finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
	* friend.c (do_friend): Likewise.
	* init.c (get_temp_regvar): Likewise.
	* method.c (make_thunk): Likewise.
	* pt.c (tsubst_friend_function): Likewise.
	(tsubst_decl): Likewise.
	(regenerate_decl_from_template): Likewise.
	* semantics.c (genrtl_named_return_value): Likewise.
	(expand_body): Likewise.
	(genrtl_finish_function): Likewise.
	* tree.c (cp_tree_equal): Likewise.

2001-03-12  Nathan Sidwell  <>

	* call.c (convert_like_real): Add extra semantics to INNER
	parameter. Don't convert to temporary if a user conversion
	gives us an lvalue that we're about to bind to a reference.
	Set INNER to indicate pending reference binding on recursive

2001-03-10  Neil Booth  <>

	* cp/lex.c: Delete duplicate pending_lang_change.

2001-03-10  Neil Booth  <>

	* cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
	* cp/repo.c (get_base_filename, open_repo_file): Similarly.
	* cp/cp-tree.h: Remove file_name_nondirectory prototype.

2001-03-09  Zack Weinberg  <>

	* Add dependencies on $(TM_P_H) as appropriate.

2001-03-08  Stan Shebs  <>

	* cp-tree.h (set_identifier_local_value): Remove unused decl.

2001-03-06  Zack Weinberg  <>

	* spew.c: Remove references to CPP_OSTRING.

2001-03-06  Andrew Haley  <>

	* typeck.c (convert_arguments): Check that we have an fndecl.

2001-03-05  Andrew Haley  <>

	* typeck.c (convert_arguments): Don't do ellipsis conversion for

2001-03-02  Nathan Sidwell  <>

	* typeck.c (build_static_cast): Allow enum to enum conversions
	as per DR 128.

2001-03-02  Nathan Sidwell  <>

	* class.c (check_field_decls): Pointers to member do not a
	non-pod struct make, as per DR 148.

2001-03-02  Nathan Sidwell  <>

	* call.c (joust): cp_pedwarn when using gnu extension concerning
	worst conversion sequences.

2001-03-01  Zack Weinberg  <>

	* decl.c: Replace all uses of 'boolean' with 'bool'.

2001-03-01  Zack Weinberg  <>

	* lang-specs.h: Add zero initializer for cpp_spec field to
	all array elements that need one.  Don't put an #ifdef inside
	the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
	use it.

2001-03-01  Nathan Sidwell  <>

	Implement using decls inside template functions.
	* decl2.c (validate_nonmember_using_decl): Don't special case
	fake_std_node in the global namespace. Don't reject early when
	processing a template.
	(do_local_using_decl): Add to statement tree. Don't do further
	processing when building a template.
	* pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.

2001-03-01  Nathan Sidwell  <>

	* decl2.c (do_nonmember_using_decl): Don't complain if we find
	same function. Do complain about ambiguating extern "C"

2001-02-28  Nathan Sidwell  <>

	Remove floating point and complex type template constant parms.
	* pt.c (convert_nontype_argument): Remove REAL_TYPE and
	COMPLEX_TYPE extensions.
	(invalid_nontype_parm_type_p): Likewise.

2001-02-27  Jeffrey Oldham  <>

	* except.c (call_eh_info): Revert "match_function"'s type.

2001-02-27  Nathan Sidwell  <>

	Fix ctor vtable vcall offsets.
	* class.c (struct vtbl_init_data_s): Add rtti_binfo member.
	(build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
	(get_matching_base): Remove.
	(get_original_base): New function.
	(build_vtbl_initializer): Initialize vid.rtti_binfo.
	Use a virtual thunk for a ctor vtable with an index
	(add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
	primary base within a constructor vtable. Only set
	BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
	when primary base has been lost.
	* cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.

2001-02-26  Jeffrey Oldham  <>

	* call.c (joust): Ensure more_specialized()'s argument length
	parameter has correct value for constructors.

2001-02-26  Nathan Sidwell  <>

	* except.c (call_eh_info): Cleanup generation of cp_eh_info struct.

	* decl.c (mark_inlined_fns): Prototype.

2001-02-22  Mark Mitchell  <>

	* spew.c (yylex): Correct handling of friends.

2001-02-22  Mark Mitchell  <>

	* mangle.c (write_encoding): Pass write_function_type the
	FUNCTION_DECL for the function being encoded.
	(write_function_type): Pass it along to write_bare_function_type.
	(write_bare_function_type): Pass it along to write_method_parms.
	(write_method_parms): Don't mangle the compiler-generated
	parameters to a constructor or destructor.

2001-02-22  Andreas Jaeger  <>

	* optimize.c: Include toplev.h for
	note_deferral_of_defined_inline_function prototype.

2001-02-22  Jakub Jelinek  <>

	* cp-tree.h (struct lang_decl_inlined_fns): New.
	(struct lang_decls): Add inlined_fns.
	(DECL_INLINED_FNS): New macro.
	* optimize.c (struct inline_data): Add inlined_fns.
	(declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
	(inlinable_function_p): Likewise, fix typo in comment,
	function is not inlinable if it already inlined function currently
	being optimized.
	(expand_call_inline): Add fn to inlined_fns if necessary.
	(optimize_function): Initialize inlined_fns.
	Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
	* decl.c (mark_inlined_fns): New function.
	(lang_mark_tree): Call it.

2001-02-21  Jason Merrill  <>

	* cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
	(DECL_UNINLINABLE): Move to middle-end.

	* class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
	* decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
	* class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
	* optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
	parms and outer BLOCK.  note_deferral_of_defined_inline_function.

	* method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
	second parm of op=.

2001-02-19  Mark Mitchell  <>

	* decl2.c (set_decl_namespace): Allow explicit instantiations in
	any namespace.

2001-02-18  Kriang Lerdsuwanakij  <>

	* optimize.c (expand_call_inline): Don't walk subtrees of type

2001-02-18  Mark Mitchell  <>

	* class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
	for a destructor.

2001-02-18  Jason Merrill  <>

	Do put the VTT parameter in DECL_ARGUMENTS.
	* cp-tree.h (struct cp_language_function): Add x_vtt_parm.
	(current_vtt_parm): New macro.
	(struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
	(DECL_HAS_VTT_PARM_P): New macro.
	(DECL_VTT_PARM): Remove.
	* decl.c (duplicate_decls): Only copy the operator code if
	(start_function): Set current_vtt_parm.
	(lang_mark_tree): Don't mark vtt_parm.
	* decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
	* class.c (build_clone): Maybe remove the VTT parm.
	* optimize.c (maybe_clone_body): Set up the VTT parm.
	* pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
	* call.c (build_over_call): Just allow the VTT arg.
	* method.c (make_thunk): Don't set DECL_VTT_PARM.
	(do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
	(synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
	* decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
	* error.c (dump_function_decl): Likewise.
	* call.c (build_user_type_conversion_1,	convert_like_real): Abort
	if we try to call a constructor with in-charge or VTT parms.
	* method.c (skip_artificial_parms_for): New fn.
	* call.c (add_function_candidate, build_over_call): Call it.
	* call.c (build_new_method_call): Use current_vtt_parm.
	* init.c (expand_virtual_init): Likewise.
	* class.c (same_signature_p): No longer static.
	* cp-tree.h: Declare it.
	* search.c (look_for_overrides_r): Use it.

2001-02-17  Mark Mitchell  <>

	* cp-tree.h (new_abi_rtti_p): Remove.
	(name_mangling_version): Likewise.
	(flag_do_squangling): Likewise.
	* class.c (build_rtti_vtbl_entries): Remove old ABI support.
	* decl.c (grokfndecl): Likewise.
	* decl2.c (name_mangling_version): Remove.
	(flag_do_squangling): Likewise.
	(lang_f_options): Remove `squangle'.
	(unsupported_options): Add `squangle'.
	(cxx_decode_option): Issue a warning about uses of
	(finish_file): Remove old ABI support.
	* pt.c (check_explicit_specialization): Likewise.
	(tsubst_decl): Likewise.
	* rtti.c (init_rtti_processing): Likewise.
	(build_headof): Likewise.
	(get_tinfo_decl_dynamic): Likewise.
	(tinfo_from_decl): Likewise.
	(build_dynamic_cast_1): Likewise.
	(synthesize_tinfo_var): Likewise.
	* init.c (build_new): Allow enumeration types for the array-bounds
	in a direct-new-declarator.

	* semantics.c (finish_typeof): Resolve OFFSET_REFs.

	* pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
	TREE_PROTECTED from the template being specialized.

2001-02-17  Jason Merrill  <>

	* decl2.c (build_artificial_parm): Set TREE_READONLY.

	* decl.c (bad_specifiers): Allow throw specs on things with
	pointer-to-function or -member-function type.
	* init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
	a pmf.

2001-02-17  Mark Mitchell  <>

	* call.c (check_dtor_name): Handle template names correctly.

2001-02-16  Jason Merrill  <>

	* cp-tree.h (DECL_USE_VTT_PARM): Remove.
	* decl2.c (maybe_retrofit_in_chrg): Don't create it.
	* optimize.c (maybe_clone_body): Don't substitute it.
	* call.c (build_new_method_call): Check in_chrg instead.
	* init.c (expand_virtual_init): Likewise.

2001-02-16  Gabriel Dos Reis  <>

	* decl.c (check_tag_decl): Make sure a typedef for an anonymous
	class-type introduces at least a type-name.

2001-02-16  Jakub Jelinek  <>

	* call.c (convert_like_real): Create a temporary for non-lvalue.

2001-02-16  Jeffrey Oldham  <>

	* cp-tree.h: Fix typos in comments.

2001-02-16  Jason Merrill  <>

	* optimize.c (remap_block): If we're compiling a clone, pass the
	new block to insert_block.

2001-02-16  Mark Mitchell  <>

	* semantics.c (finish_asm_stmt): Robustify.

2001-02-15  Mark Mitchell  <>

	* pt.c (push_template_decl_real): Don't remangle the name of a
	class template.

2001-02-15  Jim Meyering  <>

	* (c++.install-common): Depend on installdirs.
	(c++.install-info): Likewise.
	(c++.install-man): Likewise.

2001-02-15  Mark Mitchell  <>

	* typeck2.c (build_m_component_ref): Robustify.

2001-02-15  Alexandre Oliva  <>

	* friend.c (do_friend): Don't take the nested [template] class
	into account when deciding whether to warn about the friend
	function not referring to a template function.

2001-02-14  Jakub Jelinek  <>

	* typeck.c (build_unary_op): Clarify error message.

2001-02-08  Aldy Hernandez  <>

	* parse.y (component_constructor_declarator): allow optional
	parentheses around constructor class name.

2001-02-14  Nathan Sidwell  <>

	* cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
	* init.c (emit_base_init): Remove incorrect comment about
	virtual bases.
	* method.c (make_thunk): Fix comment alignment.

2001-02-14  Nathan Sidwell  <>

	Kill remnants of this is variable.
	* cp-tree.h (flag_this_is_variable): Remove.
	* decl2.c (flag_this_is_variable): Remove.
	* class.c (fixed_type_or_null): Add cdtor parm. Adjust.
	(build_vbase_path): The path is non-static, even in a cdtor.
	(resolves_to_fixed_type_p): Add additional return value.
	* search.c (init_vbase_pointers): Adjust.
	* tree.c (lvalue_p_1): Adjust.
	* typeck.c (mark_addressable): Adjust.

2001-02-14  Nathan Sidwell  <>

	* pt.c (unify): Don't check cv quals of array types.

2001-02-14  Nathan Sidwell  <>

	* tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
	check whether we already have the type.

2001-02-13  Mark Mitchell  <>

	* cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
	* call.c (build_op_delete_call): Simplify to remove duplicate
	* class.c (clone_function_decl): Don't build the deleting variant
	of a non-virtual destructor.
	* decl.c (finish_destructor_body): Don't call delete if this is a
	non-virtual destructor.
	* init.c (build_delete): Explicitly call `operator delete' when
	deleting an object with a non-virtual destructor.

2001-02-13  Jason Merrill  <>

	* lang-specs.h: Add more __EXCEPTIONS.

2001-02-12  Nathan Sidwell  <>

	* typeck2.c (process_init_constructor): Check
	TREE_HAS_CONSTRUCTOR before issuing missing init warning.

2001-02-12  Nathan Sidwell  <>

	* pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
	Remove spurious information in comment. Allow further
	adjustments of REFERENCE_TYPE args.

2001-02-12  Nathan Sidwell  <>

	* errfn.c (cp_deprecated): Tweak diagnostic text.
	* parse.y (new_initializer): Deprecate initializer lists

2001-02-12  Mark Mitchell  <>

	Remove old ABI support.

2001-02-11  Mark Mitchell  <>

	* decl2.c (flag_vtable_thunks): Always set it to 1.
	(flag_new_abi): Likewise.
	* lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.

	* (g++spec.o): Fix typo.

2001-02-09  Jason Merrill  <>

	* lang-specs.h: Restore definition of __EXCEPTIONS.

2001-02-08  Jason Merrill  <>

	* search.c (shared_member_p): New function.
	(lookup_field_r): Use it.
	* cp-tree.h (SHARED_MEMBER_P): Remove.

	* method.c (process_overload_item): Handle template-dependent array
	* pt.c (type_unification_real): If we end up with undeduced nontype
	parms, try again.

	* decl.c (lookup_name_real): Tweak warning to refer to decls, not

	* typeck2.c (friendly_abort): Don't say anything if we have
	earlier errors or sorries.

	* decl.c (check_tag_decl): Notice attempts to redefine bool and
	wchar_t.  Ignore if in_system_header.

	* decl.c (maybe_push_cleanup_level): New fn...
	(start_decl_1): ...split out from here.
	* cvt.c (build_up_reference): Use it.
	* cp-tree.h: Declare it.

2001-02-07  Mark Mitchell  <>

	* lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor

2001-02-06  Nathan Sidwell  <>

	* pt.c (lookup_template_class): Make sure it's a primary
	template or template_template_parm when called from the parser.
	(instantiate_template_class): Add assertion.

2001-02-05  Alexandre Oliva  <>

	* method.c (build_mangled_name) [old abi]: Protect flush_repeats()
	from error_mark_node.

2001-02-05  Nathan Sidwell  <>

	Fix specification and implementation bugs in V3 ABI
	construction vtables.
	* cp-tree.h (flag_dump_class_layout): New flag.
	(BINFO_PRIMARY_MARKED_P): Rename to ...
	(BINFO_PRIMARY_P): ... here.
	(binfo_via_virtual): New prototype.
	* decl2.c (flag_dump_class_layout): New flag.
	(cxx_decode_option): Set it. Adjust -fdump-translation-unit to
	use `=' as a file name separator.
	* init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
	(build_vtbl_address): If this is a virtual primary base, then
	get the vtbl of what it is ultimately primary for.
	* search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
	(dfs_skip_nonprimary_vbases_markedp): Likewise.
	(get_shared_vbase_if_not_primary): Likewise.
	(dfs_get_pure_virtuals): Likewise.
	(expand_upcast_fixups): Likewise.
	(fixup_virtual_upcast_offsets): Likewise.
	(dfs_find_vbase_instance): Likewise.
	(find_vbase_instance): Likewise.
	(binfo_from_vbase): Adjust comment to reflect reality.
	(binfo_via_virtual): New function.
	* class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
	for binfo walking during VTT construction.
	(dfs_mark_primary_bases): Remove.
	(force_canonical_binfo_r): New function.
	(force_canonical_binfo): New function.
	(mark_primary_virtual_base): New function.
	(mark_primary_bases): Walk in inheritance graph order, use
	(determine_primary_base): Use some more intermediate variables.
	(dfs_find_final_overrider): Don't check for overriding along a
	virtual path.
	(dfs_modify_vtables): Walk into primary virtual bases too.
	(walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
	(build_base_fields): Likewise.
	(dfs_set_offset_for_unshared_vbases): Likewise.
	(layout_virtual_bases): Likewise.
	(end_of_class): Likewise.
	(finish_struct_1): Call dump_class_hierarchy, if requested.
	(dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
	(dump_class_hierarchy_r): Add stream parameter. Emit more information.
	(dump_class_hierarchy): Add file parameter. Append to file, if
	(finish_vtbls): Adjust accumulate_vtbl_inits call.
	Use canonical base for virtual bases.
	(build_vtt): Add more comments. Adjust build_vtt_inits call.
	(build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
	Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
	VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
	virtual VTTs.
	(dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
	from DATA.  We want virtual primary bases and all bases via virtual.
	Only set BINFO_VPTR_INDEX for top level. Look up from a primary
	virtual base when not a construction vtable.
	(dfs_ctor_vtable_bases_queue_p): New DFS predicate.
	(build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
	Use canonical bases when processing virtual bases.
	(accumulate_vtbl_inits): We're interested in any base via a
	virtual path.
	(dfs_accumulate_vtbl_inits): If this is a primary virtual base
	within a construction vtable, determine what is being overridden.
	(build_vtbl_initializer): Add more comments
	(add_vcall_offset_vtbl_entries_1): Adjust comment.
	(build_rtti_vtbl_entries): Check if the base has lost its

2001-02-05  Mark Mitchell  <>

	* (g++spec.o): Adjust use of DRIVER_DEFINES.

Sun Feb  4 15:52:44 2001  Richard Kenner  <>

	* decl.c (pushdecl): Call abort instead of fatal.
	* except.c (decl_is_java_type): Call fatal_error instead of fatal.
	* init.c (build_new_1): Likewise.
	(build_java_class_ref): Call internal_error and fatal_error, not fatal.
	* decl.c (build_typename_type): hash_table_init now returns void.
	decl.c (init_decl_processing): Make an error non-fatal.

2001-02-04  Mark Mitchell  <>

	* cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
	* decl.c (maybe_commonize_var): Use the new name-mangling where
	* decl2.c (comdat_linkage): Enhance comments.  Make all
	compiler-generated things static, if COMDAT is not available.
	(get_tinfo_decl): Do not make typeinfo objects that belong in the
	library COMDAT.
	(tinfo_base_init): Use the correct mangled name for typeinfo
	strings, and push them into the global scope.
	(typeinfo_in_lib_p): New function.
	(synthesize_tinfo_var): Use it.
	(create_real_tinfo_var): Likewise.

2001-02-03  Jakub Jelinek  <>

	* decl.c (push_class_binding): Use context_for_name_lookup instead
	* search.c (context_for_name_lookup): Remove static.  Check for NULL
	context in the loop.
	* cp-tree.h (context_for_name_lookup): Add prototype.

2001-02-02  Jakub Jelinek  <>

	* cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
	* tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
	* call.c (convert_class_to_reference, build_user_type_conversion_1,
	add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.

2001-02-02  Mark Mitchell  <>

	* (g++spec.o): Add DRIVER_DEFINES to the list
	of macros used when compiling g++spec.c.
	* g++spec.c (lang_specific_driver): Link with the shared
	libgcc by default.

2001-01-29  Joseph S. Myers  <>

	* decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
	make_reference_declarator, make_call_declarator), method.c
	(implicitly_declare_fn), parse.y (namespace_using_decl,
	notype_unqualified_id, expr_or_declarator, new_type_id,
	after_type_declarator, direct_after_type_declarator,
	notype_declarator, complex_notype_declarator,
	complex_direct_notype_declarator, qualified_id,
	notype_qualified_id, overqualified_id, direct_new_declarator,
	absdcl, direct_abstract_declarator, conversion_declarator), pt.c
	(tsubst), semantics.c (begin_constructor_declarator): Use build_nt
	instead of build_parse_node.

2001-01-28  Kaveh R. Ghazi  <>

	* cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
	(minus_one_node): Moved to top level gcc directory.  Renamed
	to integer_minus_one_node.

	* init.c (init_init_processing): Don't set minus_one_node.
	(build_vec_init): Use integer_minus_one_node.

	* rtti.c (get_tinfo_decl_dynamic): Likewise.

2001-01-28  Jakub Jelinek  <>

	* optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
	identical and they would be replaced with constant, remove
	MODIFY_EXPR from the tree.

2001-01-27  Kaveh R. Ghazi  <>

	* Remove all dependencies on defaults.h.
	* call.c: Don't include defaults.h.
	* decl.c: Likewise.
	* decl2.c: Likewise.
	* except.c: Likewise.
	* pt.c: Likewise.
	* rtti.c: Likewise.
	* tree.c: Likewise.
	* typeck.c: Likewise.

2001-01-25  Jakub Jelinek  <>

	* mangle.c (write_mangled_name, write_encoding): Mangle overloaded
	operators even in "C" linkage.
	* method.c (set_mangled_name_for_decl): Likewise.
	* decl.c (grokfndecl): Call set_mangled_name_for_decl even for
	overloaded operators in "C" linkage.

2001-01-24  Nathan Sidwell  <>

	* pt.c (tsubst_decl): Remove IN_DECL parameter.
	(tsubst_arg_types): Check parameter is not void.
	(tsubst): Adjust tsubst_decl call.

2001-01-24  Nathan Sidwell  <>

	* call.c (add_builtin_candidate): Quote std properly, from
	previous change.

2001-01-23  Kriang Lerdsuwanakij  <>

	* pt.c (check_explicit_specialization): Clone constructors and

2001-01-23  Nathan Sidwell  <>

	* decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
	indicates anything special about template depth. Make sure we
	only count the user visible template classes.

2001-01-23  Nathan Sidwell  <>

	* call.c (build_conv): Typo in comment.
	(add_builtin_candidate): Add more explanation.
	Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
	when we have enumeral types.
	(add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
	candidates for relops and eqops.
	(joust): Simplify control flow. Allow a non-template user
	function to hide a builtin.

2001-01-22  Nathan Sidwell  <>

	* cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
	(more_specialized): Add deduction parameter.
	* call.c (joust): Adjust more_specialized call.
	(get_bindings_order): Remove.
	(get_bindings_real): Add DEDUCE parameter.
	(maybe_adjust_types_for_deduction): Return extra unify flags. Do
	(type_unification_real): Deal with DEDUCE_ORDER. Use result of
	(more_specialized): Add DEDUCE parameter. Call get_bindings_real
	(try_one_overload): Use result of maybe_adjust_types_for_deduction.
	(check_cv_quals_for_unify): Use new unify qualifier flags.
	(unify): Clear new unify qualifier flags.
	(get_bindings_real): Add DEDUCE parameter.
	(get_bindings): Adjust call to get_bindings_real.
	(get_bindings_overload): Likewise.
	(most_specialized_instantiation): Adjust call to

2001-01-19  Jason Merrill  <>

	* decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.

	* decl.c (init_decl_processing): Just force -fvtable-thunks on if

2001-01-19  Ute Pelkmann  <>

	* decl2.c (arg_assoc_class): Fix double iteration logic.

2001-01-19  Jason Merrill  <>

	* init.c (build_delete): Always call convert_force to strip cv-quals.

	* decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
	* lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
	* g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.

2001-01-19  Nathan Sidwell  <>

	* search.c (get_vbase_1): Count only virtual bases.

2001-01-19  Nathan Sidwell  <>

	* class.c (duplicate_tag_error): Robustify flag clearing.

2001-01-19  Nathan Sidwell  <>

	* cp-tree.h (lookup_template_class): Add complain parm.
	* decl.c (lookup_namespace_name): Adjust call to
	(make_typename_type): Likewise.
	* semantics.c (finish_template_type): Likewise.
	* pt.c (lookup_template_class): Add complain parm. Adjust.
	(tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
	(tsubst): Likewise.

2001-01-19  Nathan Sidwell  <>

	* pt.c (copy_default_args_to_explicit_spec): Preserve
	object's CV quals. Reorganize.

2001-01-18  Nathan Sidwell  <>

	* typeck.c (build_modify_expr): Say `initialization' for
	* init.c (build_default_init): Convert to enumeral type, if

2001-01-18  Jakub Jelinek  <>

	* parse.y (nomods_initdcl0): Properly set things up for

2001-01-18  Nathan Sidwell  <>

	* pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
	(type_unification_real): Set it.
	(unify): Use it.

2001-01-18  Nathan Sidwell  <>

	* decl.c (finish_destructor_body): Convert to vbase pointer here.

2001-01-18  Nathan Sidwell  <>

	* semantics.c (begin_class_definition): Check we're not inside a
	template parm list.

2001-01-18  Nathan Sidwell  <>

	* tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of

2001-01-16  Kriang Lerdsuwanakij  <>

	* typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
	* call.c (build_over_call): Add comment.

2001-01-16 Daniel Berlin <>

	* cvt.c (ocp_convert): Handle vector type conversion
	* typeck2.c (digest_init): Handle vector type initializations

2001-01-16  Phil Edwards  <>

	* g++spec.c:  Don't add libraries needlessly if -fsyntax-only
	  was given.

2001-01-15  Nathan Sidwell  <>

	* pt.c (check_nontype_parm): Rename to ...
	(invalid_nontype_parm_type_p): ... here.
	(process_template_parm): Adjust.
	(convert_template_argument): Adjust.

2001-01-15  Nathan Sidwell  <>

	* pt.c (check_nontype_parm): New function.
	(process_template_parm): Use it.
	(convert_template_argument): Use it.
	(convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to

2001-01-14  Jeffrey Oldham  <>

	* tree.c: Add defaults.h
	(cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
	* (cp/tree.o): Add defaults.h.

2001-01-13  Joseph S. Myers  <>

	* (CXX_C_OBJS): Add c-format.o.

2001-01-13  Joseph S. Myers  <>

	* g++.1: Change to be ".so man1/gcc.1".

2001-01-13  Joseph S. Myers  <>

	* (, c++.install-info): Build and install g++
	internals info.
	(c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
	($(srcdir)/cp/ New target.
	* gxxint.texi: Add info directory entry.  Use @@ in email address.
	* .cvsignore: Update.

2001-01-12  Nathan Sidwell  <>

	* typeck.c (build_c_cast): Do template processing earlier.
	Always pedwarn on array casts.

2001-01-12  Nathan Sidwell  <>

	* friend.c (make_friend_class): Make sure a templated class is
	actually a template.

2001-01-11  Nathan Sidwell  <>

	* decl2.c (get_guard): Set linkage from guarded decl.

2001-01-11  Nathan Sidwell  <>

	* call.c (convert_default_arg): Check for unprocessed
	* cp-tree.h (replace_defarg): Move to spew.c.
	(maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
	spew.c, which is where they really are.
	(done_pending_defargs): Declare.
	(unprocessed_defarg_fn): Declare.
	* decl.c (replace_defarg): Move to spew.c
	* parse.y (structsp): Call done_pending_defargs.
	* spew.c (defarg_fns): Rearrange list structure.
	(defarg_fnsdone): New static variable.
	(defarg_depfns): New static variable.
	(init_spew): Adjust.
	(add_defarg_fn): Store the type in TREE_TYPE.
	(do_pending_defargs): Detect and deal with ordering constraints
	and circularity.
	(done_pending_defargs): New function.
	(unprocessed_defarg_fn): New function.
	(replace_defarg): Moved from decl.c. Robustify. Don't save
	if circularity detected.

2001-01-11  Nathan Sidwell  <>

	* pt.c (unify): Check array has a domain, before checking
	whether it is variable sized.

2001-01-11  Nathan Sidwell  <>

	* decl.c (grokparms): Unobfuscate and get correct diagnostic for
	parameters with pointers to arrays of unknown bound.

2001-01-11  Nathan Sidwell  <>

	* parse.y (template_parm_header, template_spec_header): New
	reductions. Split out from ...
	(template_header): ... here. Use them.
	(template_template_parm): Use template_parm_header.
	* semantics.c (finish_template_template_parm): Add assert.

2001-01-10  Mark Mitchell  <>

	* mangle.c (write_builtin_type): Fix thinko.

	* pt.c (copy_default_args_to_explicit_spec_1): New function.
	(copy_default_args_to_explicit_spec): Likewise.
	(check_explicit_specialization): Use it.

	* class.c (finish_struct_1):  Remove last argument in call to
	make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
	* decl.c (builtin_function): Likewise.
	(build_cp_library_fn): Likewise.
	(check_initializer): Likewise.
	(make_rtl_for_nonlocal_decl): Likewise.
	(cp_finish_decl): Likewise.
	(start_function): Likewise.
	* decl2.c (finish_anon_union): Likewise.
	* friend.c (do_friend): Likewise.
	* init.c (build_java_class_ref): Likewise.
	* method.c (make_thunk): Likewise.
	* pt.c (tsubst_friend_function): Likewise.
	* semantics.c (expand_body): Likewise.

2001-01-10  Mark Mitchell  <>

	* cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
	looking at DECL_CLONED_FUNCTION for non-functions.

2001-01-10  Nathan Sidwell  <>

	* error.c (dump_template_parameter): Use parm to determine how
	to print default value.

2001-01-10  Nathan Sidwell  <>

	* class.c (duplicate_tag_error): Clear more flags.

2001-01-10  Nathan Sidwell  <>

	* call.c (build_new_method_call): Use binfo_for_vbase.

2001-01-10  Joseph S. Myers  <>

	* cp-tree.h (flag_cond_mismatch): Don't declare.
	* decl2.c (flag_cond_mismatch): Don't define.
	(lang_f_options): Remove cond-mismatch.
	(unsupported_options): Add cond-mismatch.

2001-01-09  Nathan Sidwell  <>

	* class.c (handle_using_decl): Reject using of constructor name
	of sourcing class. Allow injecting of a method with same name as
	nested class. Fixup error messages.

2001-01-09  Joseph S. Myers  <>

	* decl2.c (lang_decode_option): Handle -Wformat=2.

2001-01-08  Nathan Sidwell  <>

	* cp-tree.h (lang_decl_flags): Rename defined_in_class to
	(DECL_DEFINED_IN_CLASS_P): Rename to ...
	(DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
	* decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
	(cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
	* pt.c (check_default_tmpl_args): Adjust for
	(instantiate_class_template): Likewise.
	(instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.

	* class.c (finish_struct): Constify saved_filename.

2001-01-08  Nathan Sidwell  <>

	* class.c (duplicate_tag_error): Adjust diagnostic.
	(finish_struct): Locally set location to start of struct.
	* decl.c (fixup_anonymous_aggr): Use cp_error_at.

2001-01-08  Nathan Sidwell  <>

	* decl.c (struct binding_level): Adjust class_shadowed comments
	to reflect reality.
	(push_class_level_binding): Adjust comments to reflect reality.
	Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
	Don't set TREE_VALUE on the class_shadowed list.

2001-01-07  Alexandre Petit-Bianco  <>

	* decl2.c (acceptable_java_type): Allow references too.
	* init.c (build_java_class_ref): When using the new ABI, search
	`class$' and have it mangled with `mangle_decl.'
	* mangle.c (write_java_integer_type_codes): New function.
	(write_builtin_type): Detect and mangle Java integer and real

2001-01-07  Mark Mitchell  <>

	* decl2.c (grokfield): Don't accept `asm' specifiers for
	non-static data members.

2001-01-07  Kaveh R. Ghazi  <>

	* expr.c (cplus_expand_expr): Don't reset `target'.

2001-01-07  Neil Booth  <>

	* cp/decl2.c (cxx_post_options): Call cpp_post_options.

2001-01-05  Nathan Sidwell  <>

	* parse.y (template_datadef): Check for error_mark_node.

2001-01-05  Nathan Sidwell  <>

	* cp-tree.def (DEFAULT_ARG): Make `x' class.

2001-01-04  Joseph S. Myers  <>

	* decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
	(record_builtin_type): Make non-static.
	(flag_short_double): Don't declare.
	(init_decl_processing): Remove the creation of many tree nodes now
	in c_common_nodes_and_builtins.
	(build_void_list_node): New function.
	* decl2.c (flag_short_double, flag_short_wchar): Don't define.
	* cp-tree.h (flag_short_wchar): Don't declare.

2001-01-04  Mark Mitchell  <>

	* call.c (build_conv): Don't use build1 for USER_CONV.
	* pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.

2001-01-03  Joseph S. Myers  <>

	* lex.c (lang_init): Call c_common_lang_init.

2001-01-03  Nathan Sidwell  <>

	* search.c (lookup_fnfields_here): Remove.
	(look_for_overrides_r): Use lookup_fnfields_1.
	Ignore functions from using declarations.

2001-01-03  Nathan Sidwell  <>

	Implement exceptions specifiers for implicit member functions.
	* cp-tree.h (merge_exceptions_specifiers): Declare new function.
	* method.c (synthesize_exception_spec): New function.
	(locate_dtor, locate_ctor, locate_copy): New functions.
	(implicitly_declare_fn): Generate the exception spec too.
	* search.c (check_final_overrider): Check artificial functions
	* typeck2.c (merge_exception_specifiers): New function.

2001-01-03  Jason Merrill  <>

	* init.c (build_default_init): New fn.
	(perform_member_init): Split out from here.
	(build_new_1): Use it.  Simplify initialization logic.
	(build_vec_init): Take an array, rather than a pointer and maxindex.
	Speed up simple initializations.  Don't clean up if we're assigning.
	* cp-tree.h: Adjust.
	* decl2.c (do_static_initialization): Remove TREE_VEC case.
	* parse.y (new_initializer): Return void_zero_node for ().
	* typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
	* typeck2.c (digest_init): Only complain about user-written

2000-12-22  Mike Stump  <>

	* decl2.c: (max_tinst_depth): Increase to 50.

2001-01-02  Mark Mitchell  <>

	* class.c (invalidate_class_lookup_cache): Zero the
	* cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
	* decl.c (free_bindings): New variable.
	(push_binding): Don't create a new binding if we have one on the
	free list.
	(pop_binding): Put old bindings on the free list.
	(init_decl_processing): Use size_int, not build_int_2.
	Register free_bindings as a GC root.
	(cp_make_fname_decl): Use size_int, not build_int_2.
	(push_inline_template_parms_recursive): Likewise.
	(end_template_parm_list): Likewise.
	(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.

2001-01-02  Richard Henderson  <>

	* parse.y (asm): Set ASM_INPUT_P.

2001-01-02  Jason Merrill  <>

	* tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
	for v3 ABI.

	* typeck.c (cp_truthvalue_conversion): New fn.
	* cvt.c (ocp_convert): Use it.

	* cp-tree.h: Lose c-common.c decls.

	* typeck.c (build_unary_op): Restore old &a.f diagnostic code.
	* cvt.c (convert_to_void): Use type_unknown_p.

	* typeck.c (strip_all_pointer_quals): Also strip quals from
	pointer-to-member types.

	* (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
	parse.y as C.

	* call.c (build_new_method_call): Do evaluate the object parameter
	when accessing a static member.
	* typeck.c (build_component_ref): Likewise.

2001-01-02  Andreas Jaeger  <>

	* decl.c (cp_missing_noreturn_ok_p): New.
	(init_decl_processing): Set lang_missing_noreturn_ok_p.

2000-12-29  Jakub Jelinek  <>

	* decl.c (init_decl_processing): Fix sign of wchar_type_node.

2000-12-29  Mark Mitchell  <>

	* class.c (pushclass): Remove #if 0'd code.
	* cp-tree.h (overload_template_name): Remove.
	* decl.c (store_bindings): Simplify.
	(pop_from_top_level): Likewise.
	* pt.c (overload_template_name): Remove.
	(instantiate_decl): Don't call push_to_top_level if it's not

2000-12-28  Mark Mitchell  <>

	* pt.c (register_local_specialization): Don't return a value.
	(lookup_template_class): Use move-to-front heuristic when looking
	up template instantiations.
	(instantiate_decl): Only push_to_top_level when we're actually
	going to instantiate the template.

2000-12-29  Hans-Peter Nilsson  <>

	* search.c (binfo_for_vtable): Return least derived class, not
	most.  Handle secondary vtables.

2000-12-22  Jason Merrill  <>

	* pt.c (more_specialized): Don't optimize len==0.
	(fn_type_unification): If we're adding the return type, increase len.

	* typeck.c (build_binary_op): Fix pmf comparison logic.

	* call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not

	* semantics.c (genrtl_finish_function): Don't try to jump to
	return_label unless it exists.

	In partial ordering for a call, ignore parms for which we don't have
	a real argument.
	* call.c (joust): Pass len to more_specialized.
	(add_template_candidate_real): Strip 'this', pass len.
	* pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
	(get_bindings_order): New fn.  Pass len down.
	(get_bindings_real): Strip 'this', pass len.
	(fn_type_unification): Likewise.
	(type_unification_real): Succeed after checking 'len' args.
	(most_specialized_instantiation): Lose explicit_args parm.
	* class.c (resolve_address_of_overloaded_function): Strip 'this',
	pass len.

2000-12-21  Jason Merrill  <>

	* pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not

	* search.c (lookup_field_r): Call lookup_fnfields_1, not

	* parse.y (typename_sub2): Return the TYPE_DECL, not the type.

	* call.c (build_object_call): Also allow conversions that return
	reference to pointer to function.
	(add_conv_candidate): Handle totype being ref to ptr to fn.
	(build_field_call): Also allow members of type reference to function.
	Lose support for calling pointer to METHOD_TYPE fields.

	* error.c (dump_expr): Handle *_CAST_EXPR.

	* typeck2.c (build_scoped_ref): Always convert to the naming class.

	* tree.c (break_out_cleanups): Lose.
	* cp-tree.h: Remove prototype.
	* typeck.c (build_component_ref): Don't break_out_cleanups.
	(build_compound_expr): Likewise.
	* semantics.c (finish_expr_stmt): Likewise.

2000-12-20  Richard Henderson  <>

	* cp-tree.h: Update declarations.
	* decl.c (finish_case_label): Return the new stmt node.
	* semantics.c (finish_goto_stmt): Likewise.
	(finish_expr_stmt, finish_return_stmt): Likewise.
	(finish_break_stmt, finish_continue_stmt): Likewise.
	(finish_asm_stmt): Likewise.
	* parse.y (already_scoped_stmt): Set STMT_LINENO.
	(compstmt, implicitly_scoped_stmt, stmt): Likewise.
	(simple_if, simple_stmt): Return the new stmt node.
	(save_lineno): New.

2000-12-18  Joseph S. Myers  <>

	* cp-tree.h: Don't declare warn_long_long.

2000-12-15  Kriang Lerdsuwanakij  <>

	* tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of

2000-12-15  Kriang Lerdsuwanakij  <>

	* pt.c (unify): Handle when both ARG and PARM are

2000-12-15  Kriang Lerdsuwanakij  <>

	* pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and

2000-12-15  Jason Merrill  <>

	* init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!

	* init.c (build_new_1): Don't strip quals from type.

	* decl.c (pushdecl): Don't check for linkage on a non-decl.

	* call.c (build_op_delete_call): See through ARRAY_TYPEs.

	* call.c (build_new_function_call): Lose space before paren in
	error message.
	(build_new_method_call): Likewise.

	* typeck2.c (build_m_component_ref): Propagate quals from datum.

2000-12-14  Kriang Lerdsuwanakij  <>

	* pt.c (check_explicit_specialization): Propagate default
	function arguments to explicit specializations.

2000-12-13  DJ Delorie  <>

	* typeck.c (build_binary_op): Do signed/unsigned warnings for >?
	and <? operators.

2000-12-08  Jason Merrill  <>

	* error.c (dump_function_name): Don't let the user see __comp_ctor.

	Clean up copy-initialization in overloading code.
	* call.c (build_user_type_conversion_1): Die if we are asked to
	convert to the same or a base type.
	(implicit_conversion): Avoid doing so.  Lose reference binding code.
	(convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
	direct-initialization.  Also do direct-init part of copy-init.
	(build_user_type_conversion): Don't provide context to convert_like.
	* cvt.c (ocp_convert): build_user_type_conversion will now provide
	the constructor call for copy-init.

	* pt.c (tsubst_decl): Call clone_function_decl here if this is an
	instantiation of a member template.
	(do_decl_instantiation): Not here.

2000-12-07  Nathan Sidwell  <>

	* class.c (check_field_decls): Don't special case anonymous
	fields in error messages.
	(note_name_declared_in_class): Use %D on diagnostic.

	* tree.c (pod_type_p): Use strip_array_types.
	(cp_valid_lang_attribute): Likewise.
	* typeck.c (cp_type_quals): Strip arrays separately, to avoid
	multiple evaluations.
	(cp_has_mutable_p): Use strip_array_types.

2000-12-07  Nathan Sidwell  <>

	* cp-tree.h (sufficient_parms_p): Declare new function.
	* call.c (sufficient_parms_p): New function, broken out of ...
	(add_function_candidate): ... here. Use it.
	(add_conv_candidate): Use it.
	* decl.c (grok_ctor_properties): Use it.

2000-12-07  Jakub Jelinek  <>

	* optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.

2000-12-07  Joseph S. Myers  <>

	* decl2.c (lang_decode_option): Handle -Wformat-security.

2000-12-06  Kriang Lerdsuwanakij  <>

	* pt.c (verify_class_unification): New function.
	(get_class_bindings): Use it.
	(try_class_unification): Tidy.
	(unify): Handle when argument of a template-id is not
	template parameter dependent.
	(template_args_equal): Handle when TREE_CODE's do not match.

2000-12-06  Alexandre Oliva  <>

	* lang-specs.h (c++): When invoking the stand-alone preprocessor
	for -save-temps, pass all relevant -Defines to it, and then don't
	pass them to cc1plus.

2000-12-05  Will Cohen  <>

	* decl.c (finish_case_label): Cleared
	more_cleanups_ok in surrounding function scopes.
	(define_label): Likewise.

2000-12-05  Nathan Sidwell  <>

	* cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
	(get_matching_virtual): Remove.
	(look_for_overrides): Declare new function.
	* decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
	* class.c (check_for_override): Move base class iteration code
	to look_for_overrides.
	* search.c (next_baselink): Remove.
	(get_virtuals_named_this): Remove.
	(get_virtual_destructor): Remove.
	(tree_has_any_destructors_p): Remove.
	(struct gvnt_info): Remove.
	(check_final_overrider): Remove `virtual' from error messages.
	(get_matching_virtuals): Remove. Move functionality to ...
	(look_for_overrides): ... here, and ...
	(look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
	to be overriding.

2000-12-05  Nathan Sidwell  <>

	* typeck.c (get_delta_difference): If via a virtual base,
	return zero.
	* cvt.c (cp_convert_to_pointer): If via a virtual base, do no

2000-12-04  Richard Henderson  <>

	* error.c (dump_tree): Use output_add_string not OB_PUTS.

2000-12-04  Jason Merrill  <>

	* mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
	(write_builtin_type): Pass intSI_type_node and the like through
	* method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
	Pass intSI_type_node and the like through type_for_mode.
	* decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
	* pt.c (tsubst, unify): Likewise.
	* tree.c (walk_tree): Likewise.
	* error.c (dump_type): Likewise.
	(dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.

	* Tweak top comment for emacs.
	(cp/TAGS): Restore.

	* except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.

	* class.c (clone_function_decl): Robustify.

2000-12-04  Michael Matz  <>

	* decl.c (store_bindings): Only search in the non modified
	old_bindings for duplicates.

2000-12-04  Nathan Sidwell  <>

	* error.c (dump_function_decl): Use DECL_VIRTUAL_P, not

	* typeck.c (build_static_cast): Remove unused variable.

2000-12-01  Kriang Lerdsuwanakij  <>

	* pt.c: Fix typo in comment.

2000-12-01  Joseph S. Myers  <>

	* decl2.c (warn_format): Remove definition.
	(lang_decode_option): Handle -Wformat-nonliteral,
	-Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.

2000-12-01  Joseph S. Myers  <>

	* decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
	(init_decl_processing): Don't create string_type_node,
	const_string_type_node, wint_type_node, intmax_type_node,
	uintmax_type_node, default_function_type, ptrdiff_type_node and
	unsigned_ptrdiff_type_node.  Adjust position of call to
	(identifier_global_value): New function.

2000-12-01  Nathan Sidwell  <>

	* call.c (standard_conversion): Reject pointer to member
	conversions from ambiguous, inaccessible or virtual bases.
	* typeck.c (build_static_cast): Don't check pointers to members

2000-11-30  Nathan Sidwell  <>

	* method.c (do_build_copy_constructor): Preserve cv
	qualifications when accessing source object members.
	(do_build_assign_ref): Likewise. Remove separate diagnostics for
	unnamed fields.

2000-11-30  Nathan Sidwell  <>

	* method.c (do_build_assign_ref): Construct appropriately
	CV-qualified base reference. Don't allow const casts in base

2000-11-30  Nathan Sidwell  <>

	* call.c (build_over_call): Use VOID_TYPE_P. Don't die on
	incomplete return type.

2000-11-28  Nathan Sidwell  <>

	* parse.y (base_class.1): Produce a _TYPE not a _DECL.
	* semantics.c (finish_base_specifier): Accept a _TYPE not a

2000-11-28  Nathan Sidwell  <>

	* spew.c (yyerror): Cope if yylval.ttype is NULL.

2000-11-28  Nathan Sidwell  <>

	* decl.c (grokdeclarator): Diagnose undefined template contexts.

2000-11-28  Nathan Sidwell  <>

	* decl.c (grokdeclarator): Do type access control on friend

2000-11-27  Nathan Sidwell  <>

	* decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
	bison parser ickiness.
	* pt.c (tsubst_friend_function): Enter namespace scope when
	tsubsting the function name.
	* cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.

2000-11-27  Nathan Sidwell  <>

	* cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
	* cvt.c (cp_convert_to_pointer): Add force parameter.
	Allow conversions via virtual base if forced.
	(convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
	(ocp_convert): Likewise.
	* search.c (binfo_from_vbase): Return the virtual base's binfo.
	* typeck.c (get_delta_difference): Adjust handling of virtual

2000-11-26  Mark Mitchell  <>

	* tree.c (struct list_hash): Remove.
	(list_hash_table): Make it be an htab.
	(struct list_proxy): New type.
	(list_hash_eq): New function.
	(list_hash_pieces): Renamed from ...
	(list_hash): ... this.
	(list_hash_lookup): Remove.
	(list_hash_add): Remove.
	(hash_tree_cons): Use the generic hashtable.
	(mark_list_hash): Remove.
	(init_tree): Create the hashtable.

2000-11-25  Joseph S. Myers  <>

	* method.c (build_mangled_C9x_name): Rename to
	build_mangled_C99_name.  Change C9X references in comments to
	refer to C99.

2000-11-24  Nathan Sidwell  <>

	* parse.y (unary_expr): Move VA_ARG from here ...
	(primary): ... to here.

2000-11-24  Nathan Sidwell  <>

	* semantics.c (finish_id_expr): If type is error_mark, return

2000-11-23  Nathan Sidwell  <>

	* pt.c (lookup_template_class): Simplify loop exit constructs.
	Cope when there is no partial instantiation of a template
	template member.

Thu Nov 23 02:16:47 2000  J"orn Rennecke <>

	* (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).

2000-11-22  Mark Mitchell  <>

	* mangle.c (mangle_conv_op_name_for_type): Don't use `__op'

	* pt.c (do_decl_instantiate): Explicitly clone constructors and
	destructors that haven't already been cloned.

2000-11-20  Richard Henderson  <>

	* parse.y (yyparse_1): Rename the parser entry point.

2000-11-20  Alex Samuel  <>

	* mangle.c (write_name): Use <unscoped-name> for names directly in
	function scope.
	(write_unscoped_name): Accept names directly in function scope.

2000-11-20  Nathan Sidwell  <>

	* lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
	* parse.y (extdef): Add EXPORT reduction.
	* spew.c (yylex): Don't skip export here.

2000-11-19  Mark Mitchell  <>

	* decl.c (init_decl_processing): Correct name of pure virtual
	function under the new ABI.
	* rtti.c (throw_bad_cast): Likewise, for bad cast function.
	(throw_bad_typeid): Likewise for bad typeid function.

2000-11-18  Mark Mitchell  <>

	* decl.c (grokparms): Don't even function types of `void' type,
	* mangle.c (write_type): Don't crash when confronted with the

	* decl.c (grokparms): Don't create parameters of `void' type.

2000-11-17  Zack Weinberg  <>

	* lex.c (mark_impl_file_chain): Delete.
	(init_parse): Remove call to ggc_add_string_root.  No need to
	ggc_strdup a string constant.  Do not add impl_file_chain to GC
	(handle_pragma_implementation): No need to ggc_strdup main_filename.

2000-11-17  Nathan Sidwell  <>

	* pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.

2000-11-17  Nathan Sidwell  <>

	* cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
	* decl.c (grokdeclarator): Don't reject void parms here.
	(require_complete_types_for_parms): Simplify, use
	(grokparms): Remove bitrot. Remove funcdef parm.
	Deal with ellipsis parm lists here.
	* semantics.c (finish_parmlist): Don't append void_list_node

2000-11-17  Nathan Sidwell  <>

	* typeck2.c (incomplete_type_error): Reorganize to avoid
	excessive diagnostics.

2000-11-16  Zack Weinberg  <>

	* lex.c (struct impl_files, internal_filename): Constify a char *.

2000-11-16  Mark Mitchell  <>

	* mangle.c (write_special_name_constructor): Don't generate
	assembler junk when confronted with an old-style constructor.
	(write_special_name_destructor): Likewise.
	(mangle_decl_string): Do it here instead.

2000-11-16  Nathan Sidwell  <>

	* call.c (op_error): Make error messages clearer.

2000-11-15  Mark Mitchell  <>

	* decl.c (wrapup_globals_for_namespace): Don't mark things
	TREE_ASM_WRITTEN when they're not.

2000-11-15  Jason Merrill  <>

	* typeck2.c (friendly_abort): Uncount the error before handing
	off to fancy_abort.

2000-11-15  Nathan Sidwell  <>

	* typeck.c (lookup_anon_field): Cope with qv qualifiers.

2000-11-14  Mark Mitchell  <>

	* class.c (build_vtbl_initializer): Fix typo in comment.
	* typeck.c (expr_sizeof): Don't crash on errors.

2000-11-14  Jim Wilson  <>

	* lang-specs.h: Add %2 after %(cc1_options).

2000-11-14  Richard Henderson  <>

	* typeck.c (c_sizeof): Be strict about casting result value
	back to c_size_type_node.
	(expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.

2000-11-13  Joseph S. Myers  <>

	* typeck.c (build_unary_op): Use boolean_increment from
	c-common.c, moving the relevant code there.

2000-11-11  Jason Merrill  <>

	* typeck.c (mark_addressable): Don't call put_var_into_stack.

	* decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
	in inlines.

2000-11-10  Kaveh R. Ghazi  <>

	* decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
	* lex.c (copy_lang_decl): Likewise.

2000-11-09  Mark Mitchell  <>

	* dump.c (cp_dump_tree): Don't dump function bodies here.

	* (CXX_C_OBJS): Add c-dump.o.
	(dump.o): Update dependency list.
	* cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
	(flag_dump_translation_unit): Likewise.
	(CP_TYPE_QUALS): Adjust definition.
	(DECL_C_BIT_FIELD): Remove.
	(SET_DECL_C_BIT_FIELD): Likewise.
	(add_maybe_template): Likewise.
	(strip_array_types): Likewise.
	(dump_node_to_file): Likewise.
	(cp_dump_tree): New function.
	* decl.c (init_decl_processing): Set lang_dump_tree.
	* decl2.c (flag_dump_translation_unit): Remove.
	* dump.c: Move most of it to ../c-dump.c.
	(cp_dump_tree): New function.
	* pt.c (add_maybe_template): Remove.
	* typeck.c (strip_array_types): Likewise.

2000-11-07  Eric Christopher  <>

	* decl.c (init_decl_processing): Change definition of
	__wchar_t to wchar_t.  Remove artificial declaration of
	* lex.c: Change instances of __wchar_t to wchar_t.

2000-11-09  Nathan Sidwell  <>

	* lex.c (do_identifier): Don't lookup_name for operators.
	* parse.y (operator): Save looking_for_typename.
	(unoperator): Restore it.
	* spew.c (frob_opname): Use nth_token for lookahead.

2000-11-08  Nathan Sidwell  <>

	* decl.c (grok_op_properties): Always use coerce_new_type and
	* decl2.c (coerce_new_type): Use c_size_type_node. Preserve
	exception specification. Tidy up.
	(coerce_delete_type): Preserve exception specification. Tidy up.

2000-11-07  Joseph S. Myers  <>

	* class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
	(push_binding_level), error.c (cp_tree_printer), pt.c
	(process_partial_specialization, tsubst_template_arg_vector),
	search.c (lookup_member): Use memset () instead of bzero ().

2000-11-07  Nathan Sidwell  <>

	* decl.c (build_ptrmemfunc_type): Allow error_mark_node.

2000-11-05  Joseph S. Myers  <>

	* (c++.distdir): Remove.

2000-11-04  Mark Mitchell  <>

	* decl2.c (do_nonmember_using_decl): Allow `extern "C"'
	declarations from different namespaces to be combined.

2000-11-03  Zack Weinberg  <>

	* decl.c: Include tm_p.h.

2000-11-03  Joseph S. Myers  <>

	* tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().

2000-11-02  Joseph S. Myers  <>

	* dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
	(build_overload_value), repo.c (open_repo_file), xref.c
	(open_xref_file): Use strchr () and strrchr () instead of index ()
	and rindex ().

2000-11-01  Bernd Schmidt  <>

	* call.c (build_over_call): Call fold on the CALL_EXPR.

2000-11-01  Gabriel Dos Reis  <>

	* error.c (dump_template_decl): Separate template hearders with
	space not comma.

2000-10-31  Gabriel Dos Reis  <>

	* error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
	TS_* flags with corresponding TFF_*.  Adjust prototypes of
	functions (which used to take a tree_string_flags) to take an int.

	* cp-tree.h (enum tree_string_flags): Remove
	(type_as_string, decl_as_string, expr_as_string,
	context_as_string): Adjust prototype.

	* class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
	instead of TS_PLAIN.

	* pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
	plain `0'.

2000-10-30  Mark Mitchell  <>

	* cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
	(linkage_kind): New enumeration.
	(decl_linkage): New function.
	* decl2.c (comdat_linkage): Extend comment.
	* error.c (dump_function_decl): Print the arguments used to
	instantiate a template, even when not printing the type of the
	* pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
	not TREE_PUBLIC, to test for external linkage.
	* tree.c (decl_linkage): New function.

2000-10-28  Mark Mitchell  <>

	* pt.c (instantiate_decl): Always instantiate static data members
	initialized in-class.

2000-10-27  Zack Weinberg  <>

	* Move all build rules here from,
	adapt to new context.  Wrap all rules that change the current
	directory in parentheses.  Expunge all references to $(P).
	When one command depends on another and they're run all at
	once, use && to separate them, not ;.  Add OUTPUT_OPTION to
	all object-file generation rules.  Delete obsolete variables.

	* Delete.
	* Delete outputs= line.

2000-10-26  Gabriel Dos Reis  <>

	* error.c (dump_function_decl): Print no space between
	`ptr-operator' the `type-specifier' of the return type.
	(dump_type_prefix): Make sure we put space at the appropriate

2000-10-23  Jason Merrill  <>

	* call.c (equal_functions): Also call decls_match for extern "C" fns.

2000-10-22  Jason Merrill  <>

	* call.c (build_conditional_expr): Use ocp_convert to force
	rvalue conversion.

2000-10-22  Mark Mitchell  <>

	* call.c (standard_conversion): Use RVALUE_CONVs for all
	expressions that satisfy lvalue_p, not just those that satisfy

	* optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.

	* typeck.c (c_sizeof): Return an expression of `size_t' type,
	not one with TYPE_IS_SIZETYPE set.
	(dubious_conversion_warnings): Remove special-case code.

2000-10-21  Geoffrey Keating  <>

	* decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
	* error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
	(dump_type_prefix): Print vector-of-int as 'int vector'.
	(dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
	* tree.c (walk_tree): Handle VECTOR_TYPE.

	* decl.c (init_decl_processing): Call MD_INIT_BUILTINS.

2000-10-21  Jason Merrill  <>

	* parse.y (operator): Set got_object from got_scope.
	Set looking_for_typename.
	* decl.c (lookup_name_real): Clear val after setting from_obj.
	Reorganize diagnostic.

2000-10-20  Jason Merrill  <>

	* tree.c (walk_tree): Don't walk into default args.

	* error.c (dump_expr): Use host_integerp.

2000-10-20  David Edelsohn  <>

	* typeck2.c (abstract_virtuals_error): Use "because" instead of
	"since" in error message.

Fri Oct 20 13:54:59 2000  Richard Kenner  <>

	* typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.

2000-10-20  Jeffrey Oldham  <>

	* decl.c (revert_static_member_fn): Fixed typo.

2000-10-19  Mark Mitchell  <>

	* class.c (subobject_offset_fn): New type.
	(dfs_record_base_offsets): Remove.
	(record_base_offsets): Likewise.
	(dfs_search_base_offsets): Likewise.
	(record_subobject_offset): New function.
	(check_subobject_offset): Likewise.
	(walk_subobject_offsets): Likewise.
	(record_subobject_offsets): Likewise.
	(layout_conflict_p): Reimplement.
	(layout_nonempty_base_or_field): Correct handling of type
	conflicts during layout.
	(layout_empty_base): Likewise.
	(build_base_field): Adjust to handle new representation of empty
	base offset table.
	(build_base_fields): Likewise.
	(layout_virtual_bases): Likewise.
	(splay_tree_compare_integer_csts): New function.
	(layout_class_type): Use a splay_tree, rather than a varray, to
	represent the offsets of empty bases.

	* cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
	* decl.c (select_decl): Don't return declarations that are

2000-10-18  Mark Mitchell  <>

	* cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
	(fake_std_node): New macro.
	* decl.c (in_std): Rename to ...
	(in_fake_std): ... this.
	(flag_no_builtin): Remove.
	(flag_no_nonansi_builtin): Likewise.
	(walk_namespaces_r): Use fake_std_node.
	(push_namespace): Use std_identifier.
	(pop_namespace): Use in_fake_std.
	(lookup_name_real): Use fake_std_node.
	(init_decl_processing): When -fhonor-std, create the `std'
	namespace.  Don't create a dummy fake_std_node in that case.
	Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
	(builtin_function): Put builtins whose names don't begin
	with `_' in the std namespace.
	* decl2.c (flag_no_builtin): Remove.
	(flag_no_nonansi_builtin): Likewise.
	(set_decl_namespace): Use fake_std_node.
	(validate_nonmember_using_decl): Likewise.
	(do_using_directive): Likewise.
	(handle_class_head): Likewise.
	* dump.c (dequeue_and_dump): Likewise.
	* except.c (init_exception_processing): Use std_identifier.
	* init.c (build_member_call): Use fake_std_node.
	* rtti.c (init_rtti_processing): Use std_identifier.

2000-10-17  Mark Mitchell  <>

	* cp-tree.h (back_end_hook): Remove declaration.
	* decl2.c (back_end_hook): Remove definition.

	* dump.c (dequeue_and_dump): Dump TREE_USED.

Tue Oct 17 20:19:06 2000  Brad Lucier <>

	* spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).

2000-10-17  Joseph S. Myers  <>

	* decl.c (WINT_TYPE): Define.
	(init_decl_processing): Create types unsigned_ptrdiff_type_node,
	c_size_type_node, signed_size_type_node and wint_type_node.

2000-10-17  Joseph S. Myers  <>

	* decl2.c (warn_missing_format_attribute): New variable.
	(lang_decode_option): Decode -Wmissing-format-attribute.

2000-10-16  Mark Mitchell  <>

	* typeck.c (qualify_type): Remove.
	(composite_pointer_type): Fix handling of conversions to `cv void*'.

2000-10-14  Kaveh R. Ghazi  <>

	* (parse.c, parse.h): Fix think-o in last patch.

2000-10-13  Kaveh R. Ghazi  <>

	* (parse.c, parse.h): Create atomically.

2000-10-12  Mark Mitchell  <>

	* class.c (current_obstack): Remove.
	* decl.c (ggc_p): Remove.
	(start_decl): Don't use decl_tree_cons.
	(grokdeclarator): Don't use build_decl_list.
	(start_function): Don't use decl_tree_cons.
	(finish_function): Don't mess with obstacks.
	* decl2.c (grok_x_components): Don't use build_decl_list.
	* lex.c (make_call_declarator): Don't call decl_tree_cons.
	(implicitly_declare_fn): Don't call build_decl_list.
	* parse.y (frob_specs): Don't call build_decl_list or
	(expr_or_declarator_intern): Don't call decl_tree_cons.
	(primary): Don't call build_decl_list.
	(fcast_or_absdcl): Likewise.
	(typed_declspecs): Don't call decl_tree_cons.
	(reserved_declspecs): Don't call build_decl_list.
	(declmods): Likewise.
	(reserved_typespecquals): Likewise.
	(aggr): Likewise.
	(new_type_id): Likewise.
	(cv_qualifiers): Likewise.
	(after_type_declarator_intern): Likewise.
	(notype_declarator_intern): Likewise.
	(absdcl_intern): Likewise.
	(named_parm): Likewise.
	* pt.c (most_specialized_class): Likewise.
	* repo.c (temporary_obstack): Make it a structure, not a pointer.
	(init_repo): Initialize it.
	* search.c (current_obstack): Remove.
	* typeck2.c (add_exception_specifier): Don't call build_decl_list.

2000-10-09  Richard Henderson  <>

	(c++ language support bits for libgcc): Remove.
	(c++.clean): Remove cplib2.txt cleanup.
	* (headers, lib2funcs): Remove.

	*,,, Remove files.
	*, tinfo.h,, Remove files.
	* inc/cxxabi.h, inc/exception, inc/new: Remove files.
	* inc/new.h, inc/typeinfo: Remove files.

2000-10-08  Joseph S. Myers  <>

	* decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
	(init_decl_processing): Initialize intmax_type_node and

2000-10-06  Richard Henderson  <>

	* cp-tree.h (struct cp_language_function): Remove x_result_rtx.
	(original_result_rtx): Remove.
	* decl.c (save_function_data): Don't clear x_result_rtx.
	(mark_lang_function): Don't mark it either.
	* expr.c (fixup_result_decl): Remove.
	* semantics.c (genrtl_named_return_value): Frob the return decl
	before calling emit_local_var.
	(genrtl_finish_function): Don't call fixup_result_decl.
	Always emit the jump to return_label.

2000-10-06  Nathan Sidwell  <>

	* pt.c (lookup_template_class): Set current access for enum.
	(tsubst_enum): Set file & line for enum decl.

	* spew.c (yylex): Remove unused variable.

2000-10-05  Richard Henderson  <>

	* semantics.c (genrtl_finish_function): Don't init or check
	can_reach_end; remove noreturn and return value checks.

2000-10-05  Tom Tromey  <>

	* init.c (build_java_class_ref): Use `build_static_name' with a
	suffix, not a prefix, to build the class object's name.

2000-10-05  Nathan Sidwell  <>

	* cp-tree.h (access_kind): Fix comment typo.
	* decl2.c (grokfield): Fix diagnostic typo.
	* semantics.c (finish_template_type): Fix comment typo.
	(finish_qualified_object_call_expr): Likewise.

2000-10-05  Nathan Sidwell  <>

	* pt.c (tsubst_expr, DECL_STMT case): Don't process if
	tsubsting fails.

2000-10-05  Nathan Sidwell  <>

	* spew.c (frob_id): New static function.
	(frob_opname): Use it.
	(yylex): Use it.

2000-10-01  Mark Mitchell  <>

	* decl.c (lang_mark_false_label_stack): Remove.
	* lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.

2000-09-30  Joseph S. Myers  <>

	* gxxint.texi: Use @email for formatting email addresses.

2000-09-29  Gabriel Dos Reis  <>

	* error.c: Remove direct obstack manipulation.  Replace with
	output_buffer-based formatting.  Adjust calls to removed macros.
	(obstack_chunk_alloc, obstack_chunk_free): Remove.

2000-09-24  Mark Mitchell  <>

	* ir.texi: Move to ../c-tree.texi.

2000-09-20  Jason Merrill  <>

	* decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.

2000-09-21  Andreas Jaeger  <>

	* errfn.c: Move declaration of cp_printer and cp_printers to ...
	* cp-tree.h: ... here.

	* error.c: Remove declaration of cp_printer.

2000-09-20  Mark Mitchell  <>

	* tree.c (mark_local_for_remap_r): Handle CASE_LABELs.

2000-09-20  Hans-Peter Nilsson  <>

	* except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and

2000-09-18  Mark Mitchell  <>

	* decl.c (start_function): Robustify.

2000-09-18  Kaveh R. Ghazi  <>

	* cp-tree.h (check_function_format): Accept a `status' parameter.

	* call.c, typeck.c: Updates calls to `check_function_format'.

2000-09-17  Geoffrey Keating  <>

	* decl2.c (handle_class_head): Always push some scope even
	in the error case.

2000-09-16  Mark Mitchell  <>

	* cp-tree.h (struct cp_language_function): Remove
	x_scope_stmt_stack and name_declared.
	(current_scope_stmt_stack): Remove.
	(function_name_declared_p): New macro.
	(struct lang_decl_flags): Use c_lang_decl as a base class.
	(context): Remove.
	(struct lang_decl): Replace saved_tree with context.
	(DECL_FRIEND_CONTEXT): Adjust accordingly.
	(cplus_expand_expr_stmt): Don't declare.
	(add_decl_stmt): Likewise.
	(add_scope_stmt): Likewise.
	* decl.c (mark_stmt_tree): Remove.
	(case_compare): Likewise.
	(finish_case_label): Use c_add_case_label.
	(init_decl_processing): Set more language-specific hooks.
	(build_enumerator): Fix typo in comment.
	(cplus_expand_expr_stmt): Remove.
	(mark_lang_function): Use mark_c_language_function.
	(lang_mark_tree): Use c_mark_lang_decl.
	* decl2.c: Change order of inclusion.
	* except.c: Likewise.
	* expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
	back on c_expand_expr.
	* friend.c: Include expr.h.
	* init.c: Change order of inclusion.
	* Update dependencies.
	* lex.h (free_lang_decl_chain): Remove.
	* optimize.c (maybe_clone_body): Use function_name_declared_p.
	* pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
	it doesn't exist.
	(instantiate_decl): Use function_name_declared_p.
	* semantics.c (lang_expand_expr_stmt): Remove.
	(set_current_function_name_declared): Likewise.
	(current_function_name_declared): Likewise.
	(begin_compound_stmt): Use function_name_declared_p.
	(add_decl_stmt): Remove.
	(setup_vtbl_ptr): Use function_name_declared_p.
	(add_scope_stmt): Remove.
	(current_scope_stmt_stack): New function.
	(cp_expand_stmt): Don't handle SCOPE_STMTs.
	(expand_body): Use function_name_declared_p.
	* tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
	* typeck.c: Change order of includes.
	(convert_sequence): Remove.

2000-09-14  Joseph S. Myers  <>

	* lex.c (reswords): Add _Complex.

Thu Sep 14 12:10:45 2000  Richard Kenner  <>

	* (cplib2.txt): Depend on cp/Makefile.

2000-09-13  J. David Anglin  <>

	* init.c (begin_init_stmts): Don't use // comments.

2000-09-12  Jason Merrill  <>

	* decl.c (maybe_deduce_size_from_array_init): Set do_default for
	all non-extern arrays.

	* decl.c (grokdeclarator): Complain about 'friend T' for implicit
	typenames, too.  Downgrade complaint to pedwarn.
	(xref_tag): Warn about surprising behavior of 'friend struct T'.
	* decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
	'class This::Inherited'.

2000-09-12  Mark Mitchell  <>

	* decl.c (finish_case_label): Given the LABEL_DECL a

2000-09-12  Gabriel Dos Reis  <>

	New macros.
	(sorry_for_unsupported_tree, print_scope_operator,
	print_left_paren, print_right_paren, print_left_bracket,
	print_right_bracket, print_whitespace): Likewise.
	(aggr_variety): Rename to class_key_or_enum.
	(print_type): Rename to print_type_id.
	(print_type_specifier_seq, print_simple_type_specifier,
	print_parameter_declaration_clause, print_exception_specification,
	print_nested_name_specifier, print_template_id,
	typedef_original_name,  print_template_argument_list_start,
	print_template_argument_list_end): New functions.

2000-09-11  Gabriel Dos Reis  <>

	* ir.texi: Add more documentation.

2000-09-11  Mark Mitchell  <>

	* cp-tree.h (struct saved_scope): Remove x_function_parms.
	(current_function_parms): Don't define.
	(struct cp_language_function): Remove parms_stored.
	(current_function_just_assigned_this): Don't define.
	(current_function_parms_stored): Likewise.
	(static_ctors): Declare.
	(static_dtors): Likewise.
	(SF_EXPAND): Don't define.
	(expand_start_early_try_stmts): Remove declaration.
	(store_parm_decls): Likewise.
	* decl.c (static_ctors): Don't declare.
	(static_dtors): Likewise.
	(struct binding_level): Remove this_block.
	(poplevel): Remove dead code.
	(set_block): Likewise.
	(mark_binding_level): Don't mark this_block.
	(mark_saved_scope): Don't mark x_function_parms.
	(init_decl_processing): Don't add current_function_parms as a GC
	(check_function_type): Change prototype.
	(start_function): Remove RTL-generation code.
	(expand_start_early_try_stmts): Remove.
	(store_parm_decls): Give it internal linkage.  Remove
	RTL-generation code.
	(finish_function): Remove RTL-generation code.
	* decl2.c (static_ctors): Fix formatting.
	(static_dtors): Likewise.
	* method.c (use_thunk): Don't call store_parm_decls.
	(synthesize_method): Likewise.
	* optimize.c (maybe_clone_body): Likewise.
	* parse.y (fn.def2): Likewise.
	(.set_base_init): Likewise.
	(nodecls): Likewise.
	* pt.c (instantiate_decl): Likewise.
	* rtti.c (synthesize_tinfo_fn): Likewise.
	* semantics.c (genrtl_try_block): Simplify.
	(expand_body): Use genrtl_start_function and
	(genrtl_start_function): New function.
	(genrtl_finish_function): Likewise.

2000-09-11  Nathan Sidwell  <>

	* error.c (cp_tree_printer, case 'P'): Append break.

2000-09-11  Nathan Sidwell  <>

	* cp-tree.h (frob_opname): Declare.
	* parse.y (saved_scopes): New static variable.
	(cp_parse_init): Adjust.
	(do_id): If lastiddecl is NULL, do do_identifier.
	(operator): Save scope information.
	(unoperator): New reduction. Restore scope information.
	(operator_name): Append unoperator. Call frob_opname.
	* spew.c (frob_opname): Define.

2000-09-10  Zack Weinberg  <>

	* decl.c, rtti.c: Include defaults.h if not already included.
	Don't define the *_TYPE_SIZE macros.

2000-09-09  Mark Mitchell  <>

	* cp-tree.h (push_switch): Change prototype.
	(check_cp_case_value): Remove declaration.
	(decl_constant_value): Likewise.
	* decl.c (struct cp_switch): Add switch_stmt and cases.
	(case_compare): New function.
	(push_switch): Set switch_stmt.  Initialize cases.
	(pop_switch): Clean up cases.
	(define_case_label): Rename to ...
	(finish_case_label): ... this.  Do semantic analysis for case
	labels here.
	(start_function): Correct comment.
	* decl2.c (check_cp_case_value): Remove.
	* expr.c (do_case): Remove.
	* pt.c (tsubst_expr): Adjust call to finish_case_label.
	* semantics.c (genrtl_do_poplevel): Remove declaration.
	(finish_break_stmt): Use build_break_stmt.
	(finish_continue_stmt): Use build_continue_stmt.
	(finish_switch_cond): Adjust condition here, rater than in
	(finish_case_label): Remove.
	* typeck.c (c_expand_return): Remove.
	(c_expand_start_case): Likewise.

2000-09-07  Gabriel Dos Reis  <>

	* ir.texi: Document type nodes.

2000-09-06  Mark Mitchell  <>

	* cp-tree.h (init_cp_semantics): Declare.
	(genrtl_try_block): Don't declare.
	(genrtl_handler): Likewise.
	(genrtl_catch_block): Likewise.
	(genrtl_ctor_stmt): Likewise.
	(genrtl_subobject): Likewise.
	(genrtl_do_poplevel): Likewise.
	(genrtl_named_return_value): Likewise.
	* lex.c (init_parse): Call init_cp_semantics.
	* semantics.c (genrtl_try_block): Give it internal linkage.
	(genrtl_handler): Likewise.
	(genrtl_catch_block): Likewise.
	(genrtl_ctor_stmt): Likewise.
	(genrtl_subobject): Likewise.
	(genrtl_do_poplevel): Likewise.
	(genrtl_named_return_value): Likewise.
	(lang_expand_stmt): Rename to ...
	(cp_expand_stmt): ... this.  Only handle C++-specific nodes.
	(init_cp_semantics): Define.

	* decl.c (initialize_local_var): Remove RTL-generating code.
	* semantics.c (genrtl_try_block): Fix formatting.

	Move statement-tree facilities from C++ to C front-end.
	* cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
	(void_zero_node): Remove.
	(stmt_tree): Likewise.
	(scope_chain): Adjust.
	(language_function): Rename to cp_language_function.
	(cp_function_chain): Adjust.
	(current_stmt_tree): Remove.
	(last_tree): Likewise.
	(last_expr_type): Likewise.
	(struct lang_decl): Adjust.
	(add_tree): Remove.
	(begin_stmt_tree): Likewise.
	(finish_stmt_tree): Likewise.
	(walk_tree_fn): Likewise.
	(walk_stmt_tree): Likewise.
	* class.c (finish_struct): Replace use of add_tree with add_stmt.
	* decl.c (mark_stmt_tree): Adjust type.
	(init_decl_processing): Don't build void_zero_node.
	(initialize_local_var): Adjust usage of current_stmt_tree.
	(finish_enum): Use add_stmt, not add_tree.
	(save_function_data): Adjust use of language_function.
	(finish_constructor_body): Use add_stmt, not add_tree.
	(finish_destructor_body): Likewise.
	(push_cp_function_context): Adjust use of language_function.
	(pop_cp_function_context): Likewise.
	(mark_lang_function): Likewise.
	(mark_cp_function_context): Likewise.
	* init.c (build_aggr_init): Adjust use of current_stmt_tree.
	(build_vec_init): Likewise.
	* semantics.c (SET_LAST_STMT): Remove.
	(RECHAIN_STMTS): Don't use it.
	(stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
	(current_stmt_tree): Define.
	(add_tree): Remove.
	(finish_goto_stmt): Use add_stmt, not add_tree.
	(finish_expr_stmt): Likewise.
	(begin_if_stmt): Likewise.
	(finish_then_clause): Likewise.
	(begin_while_stmt): Likewise.
	(begin_do_stmt): Likewise.
	(finish_return_stmt): Likewise.
	(begin_for_stmt): Likewise.
	(finish_break_stmt): Likewise.
	(finish_continue_stmt): Likewise.
	(begin_switch_stmt): Likewise.
	(finish_case_label): Likewise.
	(begin_try_block): Likewise.
	(begin_function_try_block): Likewise.
	(begin_handler): Likewise.
	(begin_catch_block): Likewise.
	(begin_compound_stmt): Likewise.
	(begin_asm_stmt): Likewise.
	(finish_asm_stmt): Likewise.
	(finish_label_stmt): Likewise.
	(add_decl_stmt): Likewise.
	(finish_subobject): Likewise.
	(finish_decl_cleanup): Likewise.
	(finish_named_return_value): Likewise.
	(setup_vtbl_ptr): Likewise.
	(add_scope_stmt): Likewise.
	(finish_stmt_expr): Likewise.
	(prune_unused_decls): Remove.
	(begin_stmt_tree): Likewise.
	(finish_stmt_tree): Likewise.
	(prep_stmt): Adjust use of current_stmt_tree.
	(lang_expand_stmt): Likewise.
	* tree.c (statement_code_p): Remove.
	(cp_statement_code_p): New function.
	(walk_stmt_tree): Remove.
	(init_tree): Set lang_statement_code_p.

2000-09-06  Zack Weinberg  <>

	Integrated preprocessor.

	*, Remove all references to input.c,
	gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
	* gxx.gperf, hash.h, input.c: Delete.
	* lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
	initialized properly.

	* class.c (fixup_pending_inline): Take a tree, not a
	struct pending_inline *.  All callers changed.
	(init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
	RID_PROTECTED entries in ridpointers[] array here.
	* decl.c (duplicate_decls): Do not refer to struct
	(record_builtin_type, init_decl_processing): Use RID_MAX not
	(grokdeclarator): Use C_IS_RESERVED_WORD.
	* decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
	(grok_x_components): Do not inspect pending_inlines chain.

	* cp-tree.h (struct lang_identifier): Add rid_code entry.
	(flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
	(DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
	Update prototypes.
	* lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
	single 32-bit word.
	* parse.y: Call do_pending_inlines unconditionally.
	reinit_parse_for_method is now snarf_method.  fn.defpen is no
	longer necessary.  Remove unnecessary <itype> annotation on
	SCOPE.  Do not refer to end_of_file or struct pending_inline.
	* semantics.c (begin_inline_definitions): Call
	do_pending_inlines unconditionally.

	* lex.c: Remove all code now shared with C front end.
	Initialize cpplib properly if USE_CPPLIB.  Put reserved words
	into the get_identifier table.  Rewrite pragma handling to
	work with the registry.  Move code to save tokens for later
	processing to spew.c.

	* spew.c: Rewrite everything in terms of token streams instead
	of text.  Move routines here from lex.c / input.c as
	appropriate.  GC-mark trees hanging off the pending inlines

2000-09-06  Mark Mitchell  <>

	* NEWS: Mention that the named return value extension has been
	* cp-tree.h (original_result_rtx): Define.
	(DECL_VPARENT): Likewise.
	(pushdecl_nonclass_level): Likewise.
	(store_return_init): Likewise.
	(reinit_lang_specific): Likewise.
	(genrtl_named_return_value): Change prototype.
	* decl.c (original_result_rtx): Remove.
	(cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
	Do not generate RTL for local variables here.
	(store_return_init): Remove.
	* semantics.c (genrtl_named_return_value): Simplify.  Fold in
	(finish_named_return_value): Adjust accordingly.  Warn that this
	extension is deprecated.
	(lang_expand_stmt): Adjust call to genrtl_named_return_value.

2000-09-06  Nathan Sidwell  <>

	* pt.c (type_unification_real): Replace switch with if.
	(unify): Tsubst non-type parms before comparing.

2000-09-06  Nathan Sidwell  <>

	* error.c (dump_typename): New function, broken out of ...
	(dump_type): ... here. Use it.
	* typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.

2000-09-06  Nathan Sidwell  <>

	* init.c (build_offset_ref): Deal with namespace scoped

2000-09-06  Nathan Sidwell  <>

	* class.c (resolve_address_of_overloaded_function): Add
	explanation message.
	* decl.c (define_case_label): Reformat explanation.
	* decl2.c (finish_static_data_member_decl): Likewise.
	(grokfield): Likewise.
	* friend.c (do_friend): Likewise.

2000-09-05  Zack Weinberg  <>

	* tree.c (walk_tree): Expose tail recursion.
	(walk_stmt_tree): New function.
	* cp-tree.h: Prototype walk_stmt_tree.
	* semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
	the BLOCKs directly.  If a BLOCK has no variables after
	pruning, discard it.
	(finish_stmt_tree): Use walk_stmt_tree.  No need to save and
	restore the line number.

2000-09-05  Mark Mitchell  <>

	* (CXX_TREE_H): Add dependency on HTAB_H.
	(pt.o): Remove dependency on HTAB_H.
	* cp-tree.h: Include hashtab.h.
	(walk_tree): Change prototype.
	(walk_tree_without_duplicates): New function.
	* decl.c (check_default_argument): Use it.
	* optimize.c (remap_decl): Adjust calls to walk_tree.
	(copy_body): Likewise.
	(expand_calls_inline): Likewise.
	(calls_setjmp_p): Use walk_tree_without_duplicates.
	* pt.c: Don't include hashtab.h.
	(for_each_template_parm): Use walk_tree_without_duplicates.
	* semantics.c (finish-stmt_tree): Likewise.
	(expand_body): Likewise.
	* tree.c (walk_tree): Add additional parameter.
	(walk_tree_without_duplicates): New function.
	(count_trees): Use it.
	(verify_stmt_tree): Adjust call to walk_tree.
	(find_tree): Use walk_tree_without_duplicates.
	(no_linkage_check): Likewise.
	(break_out_target_exprs): Adjust call to walk_tree.
	(cp_unsave): Likewise.

2000-09-04  Kriang Lerdsuwanakij  <>

	* cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
	(TEMPLATE_TEMPLATE_PARM): Adjust comment.
	* cp-tree.h (TYPE_BINFO): Adjust comment.
	* class.c (push_nested_class): Likewise.
	* decl.c (lookup_name_real): Likewise.
	(grokdeclarator): Likewise.
	(grok_op_properties): Likewise.
	(xref_tag): Likewise.
	(xref_basetypes): Likewise.
	* decl2.c (constructor_name_full): Likewise.
	(arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
	(arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
	* error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
	(dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
	(dump_type_suffix): Likewise.
	* init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
	(get_aggr_from_typedef): Likewise.
	* mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
	(write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
	(write_template_parm): Likewise.
	(write_template_template_parm): Check tree code instead of
	* method.c (build_overload_nested_name): Add
	(process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
	* parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
	* pt.c (convert_template_argument): Check tree code instead of
	(for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
	(for_each_template_parm): Adjust comment.
	(tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
	(unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
	template_args_equal to compare template template parameter cases.
	* ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
	* search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
	* tree.c (copy_template_template_parm): Decide whether to create
	(copy_tree_r): Likewise.
	* typeck.c (comptypes): Likewise.  Check tree code instead of

2000-09-04  Mark Elbrecht  <>

	* decl.c (finish_function): Move the code for handling functions
	marked with the constructor and destructor attributes inside the
	expand_p block.

2000-09-04  Nathan Sidwell  <>

	* init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.

2000-09-04  Nathan Sidwell  <>

	* pt.c (lookup_template_class): Remove abort.
	* tree.c (get_type_decl): Allow error_mark_node.

2000-09-04  Nathan Sidwell  <>

	* decl2.c (arg_assoc): Deal with COMPONENT_REFs inside

2000-09-03  Mark Mitchell  <>

	* operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
	new ABI mangling.

2000-09-01  Nathan Sidwell  <>

	* parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
	union tag mismatch error reporting.

2000-09-01  Nathan Sidwell  <>

	* call.c (build_scoped_method_call): Check it is not a namespace.

2000-08-30  Jason Merrill  <>

	* cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.

	* tree.c (bot_manip): Check TREE_CONSTANT rather than
	!TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
	build_target_expr_with_type for the non-AGGR_INIT_EXPR case.

	* decl.c (start_function): Always call make_function_rtl.

2000-08-29  Zack Weinberg  <>

	* semantics.c (prune_unused_decls): New function.
	(finish_stmt_tree): Call it via walk_tree.

2000-08-29  Zack Weinberg  <>

	* class.c (build_secondary_vtable): Constify a char *.
	* decl.c (init_decl_processing): Initialize function_id_node,
	pretty_function_id_node, and func_id_node.
	* input.c (struct input_source): Constify 'str'.
	(feed_input): Constify first argument.
	* mangle.c (write_identifier): Constify argument.
	* pt.c (mangle_class_name_for_template): Constify argument.

2000-08-29  Mark Mitchell  <>

	* typeck.c (mark_addressable): Remove code that pokes around in

2000-08-28  Jason Merrill  <>

	* lex.c (file_name_nondirectory): Move to toplev.c.

	* cp-tree.h (LOCAL_CLASS_P): New macro.
	* class.c (finish_struct_1): Use it.

2000-08-27  Alex Samuel  <>

	* mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
	(write_encoding): Pass another argument to write_name.
	(write_name): Add ignore_local_scope parameter.  Fix handling of
	local names.
	(write_nested_name): Use write_unqualified_name.
	(write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
	(write_template_prefix): Use write_unqualified_name.
	(write_component): Remove.
	(write_local_name): Add parameter.  Use direct local entity to
	discriminator calculation.
	(write_class_enum_type): Pass another argument to write_name.
	(write_template_template_arg): Likewise.
	(make_guard_variable): Likewise.

2000-08-27  Jason Merrill  <>

	* decl.c (pushdecl): Matching decls for local externs are found in
	the current level.  Propagate linkage information from previous

2000-08-26  Gabriel Dos Reis  <>

	* ir.texi (Expressions): Fix typo.

2000-08-25  Greg McGary  <>

	* tree.c (init_tree): Use ARRAY_SIZE.

2000-08-25  Gabriel Dos Reis  <>

	* error.c (cp_tree_printer): Rework.

2000-08-25  Mark Mitchell  <>

	* (CXX_LIB2FUNCS): Remove cp-demangle.o and
	(CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
	(cp-demangle.o): Remove target.
	(dyn-string.o): Likewise.

	* decl.c (grokfndecl): Require that `main' return an `int'.
	* mangle.c (write_encoding): Don't mangle return types for
	conversion functions.

2000-08-25  Gabriel Dos Reis  <>

	* error.c (tree_formatting_info): New data type.
	(tree_being_formatted): New macro.
	(tree_formatting_flags): Likewise.
	(put_whitespace): Likewise.
	(print_tree_identifier): Likewise.
	(print_identifier): Likewise.
	(cp_tree_printer, print_function_argument_list, print_declaration,
	print_expression, print_function_declaration,
	print_function_parameter, print_type, print_cv_qualifier): New
	(init_error): Initialize lang_printer.

2000-08-24  Jason Merrill  <>

	* typeck.c (build_ptrmemfunc): Just reinterpret if there's no
	adjustment necessary.

2000-08-24  Greg McGary  <>

	* cp-tree.h (MAIN_NAME_P): Remove macro.

2000-08-24  Gabriel Dos Reis  <>

	* error.c (print_instantiation_context): Don't forget to flush the

2000-08-23  Jason Merrill  <>

	* typeck.c (build_ptrmemfunc): Save the input pmf.

	* method.c (process_modifiers): Use same_type_p.

2000-08-23  Mark Mitchell  <>

	* mangle.c (write_function_type): Change prototype.
	(write_encoding): Don't mangle return types for
	constructors or destructors.
	(write_type): Adjust call to write_function_type.
	* pt.c (instantiate_template): Instantiate alternate entry points
	when instantiating the main function.

2000-08-23  Gabriel Dos Reis  <>

	* error.c (cp_print_error_function): Don't use embedded '\n' in

2000-08-23  Gabriel Dos Reis  <>

	* decl.c (init_decl_processing): Remove bogus initialization.
	* error.c (lang_print_error_function): Restore here.
	(init_error): Initialize print_error_function.

2000-08-22  Theodore Papadopoulo  <>

	* decl2.c (arg_assoc): Revert my 2000-08-11 change.

2000-08-22  Gabriel Dos Reis  <>

	* (error.o): Depends on diagnostic.h

	* cp-tree.h (problematic_instantiation_changed,
	record_last_problematic_instantiation, current_instantiation,
	print_instantiation_context): Declare.
	(maybe_print_template_context): Remove.

	* decl.c (init_decl_processing): Set print_error_function to NULL.
	(lang_print_error_function): Remove, since we're using a new

	* error.c: #include diagnostic.h
	(function_category): New function.
	(cp_diagnostic_starter): Likewise.
	(cp_diagnostic_finalizer): Likewise.
	(cp_print_error_function): Likewise.
	(maybe_print_instantiation_context): Likewise.
	(print_instantiation_full_context): Likewise.
	(print_instantiation_partial_context): Likewise.
	(print_instantiation_context): Define.
	(init_error): Initialize diagnostic pager and finalizer.

	* pt.c (problematic_instantiation_changed): Define.
	(record_last_problematic_instantiation): Likewise.
	(current_instantiation): Likewise.
	(maybe_print_template_context): Remove.
	(print_template_context): Likewise.
	(current_tinst_level): Make static to reflect Brendan Kehoe's
	change of 1995-04-13.
	(push_tinst_level): Call print_instantiation_context.

2000-08-21  Nix  <>

	* lang-specs.h: Do not process -o or run the assembler if

2000-08-21  Joseph S. Myers  <>

	* decl.c (flag_hosted, flag_noniso_default_format_attributes): New
	* decl2.c (lang_decode_option): Disable gettext attributes for

2000-08-21  Gabriel Dos Reis  <>

	* lex.c (lang_init_options): Default diagnostic message maximum
	length to 80, when line-wrapping.

2000-08-20  Mark Mitchell  <>

	* class.c (build_vtbl_initializer): Clear the entire
	vtbl_init_data.  Start keeping track of the functions for which we
	have created vcall offsets here.
	(dfs_build_vcall_offset_vtbl_entries): Remove.
	(build_vcall_offset_vtbl_entries): Reimplement.
	(add_vcall_offset_vtbl_entries_r): New function.
	(add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
	computing when vcall offsets are necessary.

2000-08-18  Nathan Sidwell  <>

	* decl.c (member_function_or_else): Use cp_error ... %T.
	(grokdeclarator): Likewise.
	(start_method): Likewise.
	* friend.c (make_friend_class): Use cp_pedwarn ... %T.

2000-08-18  Nathan Sidwell  <>

	* decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class

2000-08-18  Nathan Sidwell  <>

	* cp-tree.h (PTRMEM_OK_P): New macro.
	(itf_ptrmem_ok): New enumeration value.
	* class.c (resolve_address_of_overloaded_function): Add PTRMEM
	argument. Diagnose implicit pointer to member.
	(instantiate_type): Don't diagnose implicit pointer to member
	here. Pass itf_ptrmem_ok if ok. Adjust calls to
	* init.c (build_offset_ref): Set PTRMEM_OK_P.
	(resolve_offset_ref): Don't diagnose implicit pointer to member here.
	* semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
	* typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
	(build_unary_op): Deal with single non-static member in

2000-08-18  Nathan Sidwell  <>

	* decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.

2000-08-18  Nathan Sidwell  <>

	* cp-tree.h (enum_name_string): Remove prototype.
	(report_case_error): Remove prototype.
	* cp/typeck2.c (enum_name_string): Remove.
	(report_case_error): Remove.
	* error.c (dump_expr): Deal with enum values directly.
	Correctly negate integer constant.

2000-08-17  Nathan Sidwell  <>

	* inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
	(__cxa_vec_delete2, __cxa_vec_delete3): Declare.
	* (__cxa_vec_new2, __cxa_vec_new3): Implement.
	(__cxa_vec_delete2, __cxa_vec_delete3): Implement.
	(__cxa_vec_new): Use __cxa_vec_new2.
	(__cxa_vec_delete): Use __cxa_vec_delete2.

2000-08-17  Nathan Sidwell  <>

	* (__cxa_vec_new): Set "C" linkage.
	(__cxa_vec_ctor): Likewise.
	(__cxa_vec_cctor): Likewise.
	(__cxa_vec_dtor): Likewise.
	(__cxa_vec_delete): Likewise.
	* inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
	(__cxa_vec_ctor): Likewise.
	(__cxa_vec_cctor): Likewise.
	(__cxa_vec_dtor): Likewise.
	(__cxa_vec_delete): Likewise.

2000-08-17  Nathan Sidwell  <>

	* class.c (instantiate_type): Reinstate local variable
	deleted in previous change.

	* cvt.c (cp_convert_to_pointer): Pass itf_complain, not

2000-08-17  Nathan Sidwell  <>

	* cp-tree.h (instantiate_type_flags): New enumeration.
	(instantiate_type): Change parameter.
	* class.c (instantiate_type): Adjust prototype. Adjust.
	* call.c (standard_conversion): Adjust instantiate_type call.
	(reference_binding): Likewise.
	(build_op_delete_call): Likewise.
	(convert_like_real): Likewise.
	* cvt.c (cp_convert_to_pointer): Likewise.
	(convert_to_reference): Likewise.
	* pt.c (convert_nontype_argument): Likewise.
	* typeck.c (build_binary_op): Likewise.
	(build_ptrmemfunc): Likewise.
	(convert_for_assignment): Likewise.

2000-08-17  Nathan Sidwell  <>

	* cp-tree.h (CPTR_AGGR_TAG): New global tree node.
	(current_aggr): Define.
	* decl.c (grokdeclarator): Make sure a friend class is an
	elaborated type specifier.
	* parse.y (current_aggr): Remove static definition.
	(cp_parse_init): Adjust.
	(structsp): Clear and restore current_aggr.
	(component_decl_list): Clear current_aggr.

	* error.c (dump_type, case TYPENAME_TYPE): Don't emit the
	aggregate tag on the typename's context.

	* pt.c (tsubst_friend_class): Return error_mark_node, if
	parms becomes NULL.
	(instantiate_class_template): Ignore error_mark_node friend types.

2000-08-14  Nathan Sidwell  <>

	* cvt.c (warn_ref_binding): New static function, broken out of ...
	(convert_to_reference): ... here. Use it.

2000-08-11  Kriang Lerdsuwanakij <>

	* parse.y (template_arg): Add rule for template qualified with
	global scope.

2000-08-11  Theodore Papadopoulo <>

	* decl2.c (add_function): Reorganize.
	(arg_assoc): Do not consider function template decls.

2000-08-11  Jason Merrill  <>

	* decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
	looking inside.

2000-08-11  Nathan Sidwell  <>

	* cp-tree.h (resolve_scope_to_name): Remove unused prototype.
	(lookup_nested_tag): Likewise.

	* decl2.c (grokfield): Fix comment to reflect many types of _DECLs
	can be produced.

2000-08-11  Nathan Sidwell  <>

	* parse.y (named_complex_class_head_sans_basetype): Remove
	always true if.

2000-08-11  Nathan Sidwell  <>

	* decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
	explicit TEMPLATE_ID_EXPR args.
	(build_expr_from_tree, case CALL_EXPR): Likewise.

2000-08-11  Nathan Sidwell  <>

	* decl.c (check_tag_decl): Diagnose typename's which don't
	declare anything.

2000-08-10  Nathan Sidwell  <>

	* init.c (build_aggr_init): Reject bogus array initializers

2000-08-09  Nathan Sidwell  <>

	* rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
	* cp/ (__dynamic_cast): Likewise.
	* cp/inc/cxxabi.h (__dynamic_cast): Likewise.

2000-08-09  Nathan Sidwell  <>

	* cvt.c (convert_to_pointer_force): Fix error message when
	attempting to cast from ambiguous base.

2000-08-08  Jason Merrill  <>

	* pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
	(tsubst_template_arg_vector): Likewise.

	* decl2.c (build_anon_union_vars): Choose the largest field; don't
	assume that one will be as large as the union.

2000-08-07  Kazu Hirata  <>

	* cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
	* decl.c (pop_labels): Likewise.

2000-08-04  Jeffrey Oldham  <>

	* inc/cxxabi.h (__pbase_type_info): Changed member names to match
	(__pointer_to_member_type_info): Likewise.
	(__base_class_info): Likewise.
	(__class_type_info): Likewise.
	(__si_class_type_info): Likewise.
	(__vmi_class_type_info): Likewise.
	* (__si_class_type_info::__do_find_public_src):
	Changed member names to match specifications.
	(__vmi_class_type_info::__do_find_public_src): Likewise.
	(__si_class_type_info::__do_dyncast): Likewise.
	(__vmi_class_type_info::__do_dyncast): Likewise.
	(__si_class_type_info::__do_upcast): Likewise.
	(__vmi_class_type_info::__do_upcast): Likewise.
	* (__pbase_type_info::__do_catch): Likewise.
	(__pbase_type_info::__pointer_catch): Likewise.
	(__pointer_type_info::__pointer_catch): Likewise.
	(__pointer_to_member_type_info::__pointer_catch): Likewise.

2000-08-04  Zack Weinberg  <>

	* (cc1plus): Depend on $(BACKEND), not stamp-objlist.
	(cc1plus): Link with $(BACKEND) and $(C_OBJS).

2000-08-04  Mark Mitchell  <>

	* cp-tree.h (add_method): Change prototype.
	* class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
	Don't double the size of the method vector in the error case.
	(handle_using_decl): Adjust call to add_method.
	(add_implicitly_declared_members): Likewise.
	(clone_function_decl): Likewise.
	* decl2.c (check_classfn): Likewise.
	* semantics.c (finish_member_declaration): Likewise.

2000-08-04  Joseph S. Myers  <>

	* decl.c (flag_isoc94): New variable.

2000-08-02  Jason Merrill  <>

	* pt.c (do_type_instantiation): Add complain parm; don't complain
	if called recursively.
	* cp-tree.h, parse.y: Adjust.

2000-08-02  Zack Weinberg  <>

	* decl2.c: Silently ignore -Wstrict-prototypes; warn about

	* g++spec.c: Adjust type of second argument to
	lang_specific_driver, and update code as necessary.

	* cp-tree.h: Don't prototype min_precision here.
	(my_friendly_assert): Cast expression to void.
	* semantics.c (do_poplevel): Initialize scope_stmts.

2000-08-02  Mark Mitchell  <>

	* cp-tree.h (DECL_NEEDED_P): Tweak.

2000-07-28  Jason Merrill  <>

	* lang-specs.h: Use %i in rule for .ii files.

2000-07-31  Zack Weinberg  <>

	* lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.

2000-07-30  Mark Mitchell  <>

	Allow indirect primary bases.
	* cp-tree.h (struct lang_type): Remove vfield_parent.  Add
	(get_primary_binfo): New function.
	* decl.c (lang_mark_tree): Make lang_type::primary_base.
	* class.c (vcall_offset_data_s): Rename to ...
	(vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
	and add ctor_vtbl_p.
	(get_derived_offset): Use get_primary_binfo.
	(dfs_mark_primary_bases): Adjust handling of virtual primary
	(mark_primary_bases): Likewise.
	(set_primary_base): Take a binfo, not an integer, as a
	representation of the primary base.
	(indirect_primary_base_p): Remove.
	(determine_primary_base): Adjust for indirect primary bases.
	(dfs_find_final_overrider): Fix typo in coment.
	(update_vtable_entry_for_fn): Use get_primary_binfo.
	(layout_nonempty_base_or_field): Tweak.
	(build_base_fields): Adjust for new primary base semantics.
	(dfs_propagate_binfo_offsets): Remove.
	(propagate_binfo_offsets): Rewrite.
	(dfs_set_offset_for_shared_vbases): Remove.
	(layout_virtual_bases): Don't use it.
	(layout_class_type): Set CLASSTYPE_SIZE correctly under the new
	(finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
	(dfs_get_primary_binfo): New function.
	(get_primary_binfo): Likewise.
	(dump_class_hierarchy_r): Tweak printing of primary bases.
	(build_vtbl_initializer): Fix typo in comments.  Use
	(build_vcall_and_vbase_vtbl_entries): Likewise.
	(build_vbaes_offset_vtbl_entries): Likewise.
	(dfs_build_vcall_offset_vtbl_entries): Adjust setting of
	BV_VCALL_INDEX to handle indirect primary bases.
	(build_vcall_offset_vtbl_entries): Use vtbl_init_data.
	(build_rtti_vtbl_entries): Likewise.
	* search.c (get_shared_vbase_if_not_primary): Tweak.
	(find_vbase_instance): Likewise.
	(binfo_for_vtable): Simplify.
	* tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
	(make_binfo): Make it have 11 entries.

2000-07-30  Alex Samuel  <>

	* mangle.c (DECL_TEMPLATE_ID_P): Remove.
	(CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
	ascertaining primaryness.
	(G): Remove template_args.
	(decl_is_template_id): New function.
	(write_encoding): Use decl_is_template_id.
	(write_name): Likewise.  Handle type_decls.  Get main variant of
	type decls.
	(write_nested_name): Likewise.
	(write_prefix): Likewise.
	(write_template_prefix): Likewise.
	(write_special_name_constructor): Remove defunct production from
	(write_bare_function_type): Remove comment about absent parameter.
	(write_template_template_arg): Add missing grammar production to

2000-07-27  Jason Merrill  <>

	* decl.c (duplicate_decls): If common_type produces a non-typedef
	type for a typedef, just use the old type.

2000-07-27  Mark Mitchell  <>

	* cp-tree.h (function_depth): Declare.
	(verify_stmt_tree): Likewise.
	(find_tree): Likewise.
	* decl.c (function_depth): Give it external linkage.
	* optimize.c (optimize_function): Increment and decrement it.
	* tree.c (verify_stmt_tree_r): New function.
	(verify_stmt_tree): Likewise.
	(find_tree_r): Likewise.
	(find_tree): Likewise.

2000-07-27  Jason Merrill  <>

	* pt.c (for_each_template_parm_r, case RECORD_TYPE): Use

2000-07-26  Mark Mitchell  <>

	* decl.c (start_cleanup_fn): Mark the function as `inline'.
	* decl2.c (get_guard): Call cp_finish_decl, not
	rest_of_decl_compilation, for local guards.
	* lex.c (do_identifier): Remove unused variable.

Wed Jul 26 15:05:51 CEST 2000	Marc Espie <>

	* parse.y:  Add missing ';'.

2000-07-26  Mark Mitchell  <>

	* parse.y (empty_parms): Use `()', not `(...)', when in the scope
	of `extern "C++"'.

2000-07-25  Nathan Sidwell  <>

	Kill strict_prototype. Backwards compatibility only for
	non NO_IMPLICIT_EXTERN_C systems.
	* cp-tree.h (flag_strict_prototype): Remove.
	(strict_prototype): Remove.
	(strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
	* decl.c (maybe_push_to_top_level): Adjust.
	(pop_from_top_level): Adjust.
	(decls_match): Only allow sloppy parm matching for ancient
	system headers.
	(init_decl_processing): Adjust.
	(grokdeclarator): Adjust.
	* decl2.c (flag_strict_prototype): Remove.
	(strict_prototype): Remove.
	(strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
	(lang_f_options): Remove "strict-prototype".
	(unsupported-options): Add "strict-prototype".
	* lex.c (do_identifier): Adjust.
	(do_scoped_id): Adjust.
	* parse.y (empty_parms): Adjust.
	* class.c (push_lang_context): Adjust.
	(pop_lang_context): Adjust.
	* typeck.c (comp_target_parms): Adjust.

2000-07-25  Nathan Sidwell  <>

	* decl.c (poplevel): Deal with anonymous variables at for scope.
	(maybe_inject_for_scope_var): Likewise.

2000-07-25  Zack Weinberg  <>

	* decl.c: Remove all signal handling code, now done in toplev.c.

2000-07-23  Mark Mitchell  <>

	* decl.c (make_rtl_for_nonlocal_decl): Rework.

	* pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set

2000-07-20  Zack Weinberg  <>

	* cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
	Define my_friendly_assert and my_friendly_abort as macros
	which may call friendly_abort.  Prototype friendly abort, not
	my_friendly_abort or my_friendly_assert.
	* decl.c (signal_catch): Report the signal caught in the error
	message.  Call fatal directly.
	* typeck2.c (ack, my_friendly_assert): Delete.
	(my_friendly_abort): Rename to friendly_abort.  Expect file,
	line, and function parameters.  Report the abort code, then
	call fancy_abort.  Do not mask an abort if errors have
	already occurred.

2000-07-18  Nathan Sidwell  <>

	* typeck.c (comp_target_parms): Remove obsolete parameter.
	(comp_target_types): Adjust.

2000-07-17  Jason Merrill  <>

	* typeck.c (mark_addressable): Never set TREE_USED.
	* call.c (build_call): Don't abort on calls to library functions
	that have been declared normally.

	* typeck.c (build_binary_op): Fix grammar in warning.

	* (__eh_free): Fix prototype.

	* decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.

	* decl.c (pushdecl): Handle seeing an OVERLOAD in

2000-07-16  Mark Mitchell  <>

	* cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
	* method.c (use_thunk): Correct handling of vcall offsets.

2000-07-14  Zack Weinberg  <>

	* .cvsignore: parse.h and parse.c have no cp- prefix.

2000-07-13  Mark Mitchell  <>

	* .cvsignore: New file.

2000-07-13  Zack Weinberg  <>

	* lang-specs.h: Use the new named specs.  Remove unnecessary braces.

2000-07-12  Mark Mitchell  <>

	* ($(PARSE_H)): Depend directly on parse.y.
	* parse.c: Remove.
	* parse.h: Likewise.

2000-07-11  Mark Mitchell  <>

	* class.c (layout_class_type): Add pointers to virtual bases after
	base classes under the old ABI.

2000-07-10  Benjamin Chelf  <>

	* semantics.c (finish_for_stmt): Remove call to emit_line_note.
	(finish_continue_stmt): Likewise.
	(begin_for_stmt): Remove call to note_level_for_for.
	(finish_goto_stmt): Change call from build_min_nt
	to build_stmt.
	(finish_expr_stmt): Likewise.
	(begin_if_stmt): Likewise.
	(begin_while_stmt): Likewise.
	(finish_while_stmt): Likewise.
	(finish_return_stmt): Likewise.
	(begin_for_stmt): Likewise.
	(finish_for_stmt): Likewise.
	(finish_break_stmt): Likewise.
	(begin_switch_stmt): Likewise.
	(finish_case_label): Likewise.
	(genrtl_try_block): Likewise.
	(begin_try_block): Likewise.
	(begin_handler): Likewise.
	(begin_compound_stmt): Likewise.
	(finish_asm_stmt): Likewise.
	(finish_label_stmt): Likewise.
	(add_decl_stmt): Likewise.
	(finish_subobject): Likewise.
	(finish_decl_cleanup): Likewise.
	(finish_named_return_value): Likewise.
	(setup_vtbl_ptr): Likewise.
	(add_scope_stmt): Likewise.
	* decl.c (finish_constructor_body): Likewise.
	(finish_destructor_body): Likewise.
	* optimize.c (copy_body_r): Likewise.
	(initialize_inlined_parameters): Likewise.
	(declare_return_variable): Likewise.
	(expand_call_inline): Likewise.

2000-07-10  Jakub Jelinek  <>

	* semantics.c (expand_body): Sync interface information
	at the end of function body expansion.

2000-07-09  Jason Merrill  <>

	* init.c (build_new_1): Bail early if the call to new fails.

	* decl.c (compute_array_index_type): Check specifically for

	* decl.c (duplicate_decls): Don't call duplicate_decls on
	(decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different

	* error.c (dump_template_bindings): Don't crash if we had an
	invalid argument list.

	* typeck.c (c_expand_start_case): Do narrowing here.
	* semantics.c (finish_switch_cond): Not here.

2000-07-09  Hidvegi Zoli  <>

	* parse.y (asm_clobbers): Do string concatenation.

2000-07-09  Mark Mitchell  <>

	* decl.c (pushtag): Don't put local classes in template functions
	on the local_classes list.

2000-07-04  Scott Snyder  <>

	* decl2.c (get_guard): Add missing return for old ABI local
	variable case.

2000-07-09  Mark Mitchell  <>

	* cp-tree.h (char_type_p): New function.
	* decl.c (init_decl_processing): Don't initialize
	signed_wchar_type_node or unsigned_wchar_type_node.
	(complete_array_type): Handle brace-enclosed string-constants.
	* rtti.c (emit_support_tinfos): Remove #if 0'd code.
	* tree.c (char_type_p): New function.
	* typeck2.c (digest_init): Use char_type_p.

2000-07-06  Nathan Sidwell  <>

	* pt.c (tsubst): Don't layout type, if it's error_mark.

2000-07-06  Nathan Sidwell  <>

	* pt.c (instantiate_pending_templates): Reset template level.

2000-07-05  Jason Merrill  <>

	* call.c (joust): Don't complain about `operator char *()' beating
	`operator const char *() const'.

2000-07-04  scott snyder  <>
	    Jason Merrill  <>

	* repo.c (repo_get_id): Handle the case where a class with virtual
	bases has a null TYPE_BINFO_VTABLE.

2000-07-04  Kevin Buhr  <>
	    Jason Merrill  <>

	* parse.y (member_init): Just pass in the type.
	* init.c (expand_member_init): Handle getting a type.

2000-07-04  Martin v. L÷wis  <>
	    Jason Merrill  <>

	* decl.c (finish_function): Warn if a function has no return
	Suggested by Andrew Koenig.
	* typeck.c (check_return_expr): Do set current_function_returns_value
	if we got an error_mark_node.

2000-07-03  Nathan Sidwell  <>

	* decl2.c (push_decl_namespace): Push the original namespace.

2000-07-03  Nathan Sidwell  <>

	* pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
	* semantics.c (begin_class_definition): Clear it.

2000-07-02  Benjamin Chelf  <>

	* cp-tree.h (genrtl_goto_stmt): Remove declaration.
	(genrtl_expr_stmt): Likewise.
	(genrtl_decl_stmt): Likewise.
	(genrtl_if_stmt): Likewise.
	(genrtl_while_stmt): Likewise.
	(genrtl_do_stmt): Likewise.
	(genrtl_return_stmt): Likewise.
	(genrtl_for_stmt): Likewise.
	(genrtl_break_stmt): Likewise.
	(genrtl_continue_stmt): Likewise.
	(genrtl_scope_stmt): Likewise.
	(genrtl_switch_stmt): Likewise.
	(genrtl_case_label): Likewise.
	(genrtl_begin_compound_stmt): Likewise.
	(genrtl_finish_compound_stmt): Likewise.
	(genrtl_compound_stmt): Likewise.
	(genrtl_asm_stmt): Likewise.

	* init.c (begin_init_stmts): Remove call to
	(finish_init_stmts): Remove call to genrtl_finish_compound_stmt.

	* semantics.c (lang_expand_stmt): Changed call to
	genrtl_compound_stmt to ignore return value.

2000-07-02  Mark Mitchell  <>

	* mangle.c (canonicalize_for_substitution): Return the canonical
	variant of a type.

	* decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
	* typeck.c (commonparms): Remove obstack manipulations.

2000-07-01  Benjamin Chelf  <>

	* (cc1plus$(exeext)): Added c-semantics.o.

	* (OBJS): Added ../c-semantics.o.
	(OBJDEPS): Likewise.

	* cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
	(struct stmt_tree): Added comment.
	(current_function_name_declared): Removed.
	(stmts_are_full_exprs_p): Likewise.
	(genrtl_do_pushlevel): Likewise.
	(genrtl_clear_out_block): Likewise.
	(COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
	(emit_local_var): Likewise.
	(make_rtl_for_local_static): Likewise.
	(do_case): Likewise.
	(expand_stmt): Likewise.
	(genrtl_decl_cleanup): Likewise.
	(c_expand_asm_operands): Likewise.
	(c_expand_return): Likewise.
	(c_expand_start_case): Likewise.

	* decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
	(emit_local_var): Likewise.
	(initialize_local_var): Change reference to
	stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
	Change reference to stmts_are_full_exprs_p to
	(push_cp_function_context): Likewise.

	* expect.c (expand_throw): Change reference to

	* init.c (build_aggr_init): Change reference to
	(build_vec_init): Likewise.

	* optimize.c (maybe_clone_body): Change reference to
	current_function_name_declared to

	* pt.c (instantiate_decl): Change reference to
	current_function_name_declared to

	* semantics.c (expand_cond): Moved declaration to c-common.h.
	(genrtl_do_pushlevel): Moved to c-semantics.c.
	(genrtl_clear_out_block): Likewise.
	(genrtl_goto_stmt): Likewise.
	(genrtl_expr_stmt): Likewise.
	(genrtl_decl_stmt): Likewise.
	(gerntl_if_stmt): Likewise.
	(genrtl_while_stmt): Likewise.
	(genrtl_do_stmt): Likewise.
	(genrtl_return_stmt): Likewise.
	(genrtl_for_stmt): Likewise.
	(genrtl_break_stmt): Likewise.
	(genrtl_continue_stmt): Likewise.
	(genrtl_scope_stmt): Likewise.
	(genrtl_switch_stmt): Likewise.
	(genrtl_case_label): Likewise.
	(genrtl_begin_compound_stmt): Likewise.
	(genrtl_finish_compound_stmt): Likewise.
	(genrtl_compound_stmt): Likewise.
	(genrtl_asm_stmt): Likewise.
	(genrtl_decl_cleanup): Likewise.
	(expand_cond): Likewise.
	(expand_stmt): Renamed to ...
	(lang_expand_stmt): ... this.
	(lang_expand_expr_stmt): Initialize.
	(set_current_function_name_declared): Likewise.
	(stmts_are_full_exprs_p): Likewise.
	(current_function_name_declared): Likewise.
	(anon_aggr_type_p): Likewise.
	(do_poplevel): Change reference to
	stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
	Change reference to stmts_are_full_exprs_p to
	(add_tree): Likewise.
	(finish_expr_stmt): Likewise.
	(prep_stmt): Likewise.
	(lang_expand_stmt): Likewise.
	(begin_compound_stmt): Change reference to
	current_function_name_declared to
	cp_function_chain->name_declared and call to
	(setup_vtbl_ptr): Likewise.
	(genrtl_do_poplevel): Removed.

2000-06-30  Jason Merrill  <>

	* init.c (init_init_processing): Go back to aligning like
	double_type_node for old ABI.
	(get_cookie_size): Make cookie larger if we get a type that needs
	more alignment.
	(build_vec_delete): Call it.

	* typeck.c (qualify_type_recursive): New fn.
	(composite_pointer_type): Use it.
	(build_binary_op): Use composite_pointer_type.

2000-06-24  Carlos O'Ryan  <>
	    Jason Merrill  <>

	* typeck.c (check_return_expr): Don't complain about returning
	NULL from operator new if -fcheck-new.
	* cp-tree.h: Declare flag_check_new here.
	* init.c: Not here.

2000-06-28  Alex Samuel  <>

	* mangle.c (find_substitution): Use same_type_p.
	(write_encoding): Don't check for substitutions.

2000-06-30  Nathan Sidwell  <>

	* parse.y (expr_no_comma_rangle): New non-terminal.
	(template_parm): Use it for default parameter case.
	(template_arg): Use it.
	(expr_no_commas): Remove commented out undefined extensions.
	* (CONFLICTS): Adjust to 33 s/r & 48 r/r.
	* parse.h, parse.c: Rebuilt.

2000-06-30  Mark Mitchell  <>

	* semantics.c (genrtl_asm_stmt): Don't decay input operands here.
	(finish_asm_stmt): Do it here, instead.

	* cp-tree.h (ridpointers): Don't declare.
	* decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
	(record_builtin_java_type): Likewise.
	(init_decl_processing): Likewise.
	* lex.c: Move inclusion of lex.h.
	(ridpointers): Don't define.
	(init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
	* lex.h (enum rid): Rename to ...
	(enum cp_rid): ... this.
	(ridpointers): Don't declare.
	* parse.y: Move inclusion of lex.h.
	* parse.c: Regenerated.
	* spew.c: Move inclusion of lex.h.

	* cp-tree.h (struct language_function): Remove temp_name_counter.
	(temp_name_counter): Remove.
	(get_temp_name): Change prototype.
	(get_guard): New function.
	(get_guard_cond): Likewise.
	(set_guard): Likewise.
	* cvt.c (build_up_reference): Adjust call to get_temp_name.
	* decl.c (expand_static_init): Use get_guard and friends to
	implement guard variables.
	* decl2.c (get_temp_name): Assume that the variables created are
	always static.
	(get_sentry): Rename to ...
	(get_guard): ... this.  Implement new ABI guard	variables.
	(get_guard_bits): New function.
	(get_guard_cond): Likewise.
	(set_guard): Likewise.
	(start_static_initialization_or_destruction): Use them.
	(do_static_initialization): Replace sentry with guard throughout.
	(do_static_destruction): Likewise.
	* init.c (create_temporary_var): Add comment.

2000-06-28  Alex Samuel  <>

	* mangle.c (find_substitution): Use same_type_p.
	(write_encoding): Don't check for substitutions.

2000-06-30  Nathan Sidwell  <>

	* parse.y (expr_no_comma_rangle): New non-terminal.
	(template_parm): Use it for default parameter case.
	(template_arg): Use it.
	(expr_no_commas): Remove commented out undefined extensions.
	* (CONFLICTS): Adjust to 33 s/r & 48 r/r.
	* parse.h, parse.c: Rebuilt.

2000-06-29  Mark Mitchell  <>

	* cp-tree.h (flag_const_strings): Remove.
	(warn_parentheses): Likewise.
	(warn_format): Likewise.
	(common_type): Likewise.
	(default_conversion): Likewise.
	(build_binary_op): Likewise.
	(cp_build_binary_op): New macro.
	* call.c (build_new_op): Use cp_build_binary_op instead of
	* class.c (build_vtable_entry_ref): Likewise.
	* decl.c (expand_static_init): Likewise.
	(compute_array_index_type): Likewise.
	(build_enumerator): Likewise.
	* decl2.c (delete_sanity): Likewise.
	(start_static_initialization_or_destruction): Likewise.
	* error.c (dump_type_suffix): Likewise.
	* init.c (resolve_offset_ref): Likewise.
	(build_new): Likewise.
	(build_new_1): Likewise.
	(build_vec_delete_1): Likewise.
	(build_vec_init): Likewise.
	(build_delete): Likewise.
	* rtti.c (synthesize_tinfo_fn): Likewise.
	(synthesize_tinfo_var): Likewise.
	* search.c (expand_upcast_fixups): Likewise.
	(fixup_all_virtual_upcast_offsets): Likewise.
	* typeck.c (build_array_ref): Likewise.
	(get_member_function_from_ptrfunc): Likewise.
	(build_binary_op): Add parameter.
	(pointer_int_sum): Use cp_build_binary_op.
	(pointer_diff): Likewise.
	(build_modify_expr): Likewise.
	(get_delta_difference): Likewise.
	(build_ptrmemfunc): Likewise.

2000-06-29  Nathan Sidwell  <>

	* cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
	* decl.c (create_implicit_typedef): Adjust.
	* decl2.c (build_artificial_parm): Adjust.
	* method.c (implicitly_declare_fn): Adjust.
	* pt.c (push_inline_template_parms_recursive): Adjust.
	(process_template_parm): Adjust.
	(overloaded_template_name): Adjust.
	* semantics.c (finish_template_template_parm): Adjust.

2000-06-28  Mark Mitchell  <>

	* cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
	* class.c (update_vtable_entry_for_fn): Correct logic for deciding
	where to emit thunks.
	(build_vtt): Adjust call to build_vtt_inits.
	(build_vtt_inits): Add parameter to indicate whether or not
	sub-VTTs for virtual bases should be included.  Adjust handling of
	construction vtables.
	(get_matching_base): New function.
	(dfs_build_vtt_inits): Rename to ...
	(dfs_build_secondary_vptr_vtt_inits): Adjust handling of
	construction vtables.
	(dfs_fixup_binfo_vtbls): Likewise.
	(build_ctor_vtbl_groups): Build construction vtables for virtual
	bases, too.
	(accumulate_vtbl_inits): Tweak logic for deciding whether or not
	to build construction vtbls.
	(dfs_accumulate_vtbl_inits): Adjust handling of
	construction vtables.

	* pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
	types correctly.

2000-06-27  Mark Mitchell  <>

	* decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.

2000-06-26  Nathan Sidwell  <>

	* search.c (hides): Remove.
	(is_subobject_of_p): Add most_derived parameter. Use
	(lookup_field_queue_p): Adjust.
	(lookup_field_r): Adjust.

2000-06-26  Nathan Sidwell  <>

	* decl2.c (handle_class_head): Bash typedefs to the type's main

2000-06-25  Mark Mitchell  <>

	* cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
	(begin_global_stmt_expr): ... this.
	(genrtl_finish_stmt_expr): Rename to ...
	(finish_global_stmt_expr): ... this.
	* init.c (begin_init_stmts): Adjust calls.
	(finish_init_stmts): Likewise.
	* semantics.c (genrtl_begin_stmt_expr): Rename to ...
	(begin_global_stmt_expr): ... this.
	(genrtl_finish_stmt_expr): Rename to ...
	(finish_global_stmt_expr): ... this.

2000-06-25 Theodore Papadopoulo <>

	* search.c (lookup_member): Fix typo in comment.

2000-06-24  Jason Merrill  <>

	* decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
	(push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.

2000-06-24  Martin v. L÷wis  <>

	* parse.y (complex_direct_notype_declarator): Support global_scope.
	* Adjust conflict count.

2000-06-23  Kriang Lerdsuwanakij <>

	* parse.y (template_arg): Convert TEMPLATE_DECL
	that is a template template parameter to

	* cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
	(copy_template_template_parm): Adjust prototype.
	* decl.c (grokdeclarator): Remove dead code.
	* pt.c (process_template_parm): Tidy.
	(lookup_template_class): Construct nodes in
	(tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
	lookup_template_class.  Use TYPE_TI_TEMPLATE.
	* tree.c (copy_template_template_parm): Add NEWARGS
	(mapcar): Adjust call to copy_template_template_parm.
	* typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
	* method.c (build_template_template_parm_names): Change error
	code to avoid compilation warning.

	* gxxint.texi: Document template template parameter
	name mangling.

2000-06-21  Alex Samuel  <>

	* (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
	(CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
	(cp-demangle.o): New rule.
	(dyn-string.o): Likewise.
	* inc/cxxabi.h (__cxa_demangle): New declaration.

2000-06-22  Mark Mitchell  <>

	* cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
	(lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
	a tree, not an int.
	(make_thunk): Change prototype.
	(emit_thunk): Rename to use_thunk.
	(mangle_thunk): Change prototype.
	* class.c (get_derived_offset): Simplify.
	(copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
	(build_primary_vtable): Simplify.
	(add_virtual_function): Use BV_FN, rather than TREE_VALUE.
	(dfs_find_base): Remove.
	(update_vtable_entry_for_fn): Correct bug in finding the base
	where a virtual function was first declared.  Figure out whether
	or not to emit a vcall-thunk with the vtables in which it appears.
	Correct logic for deciding whether to use an ordinary thunk, or a
	vcall thunk.
	(finish_struct_1): Remove unnecssary code.
	(build_vtbl_initializer): Use ssize_int for the running counter of
	negative indices.
	(build_vtbl_initializer): Only use vcall thunks where necessary.
	Mark thunks as needing to be emitted with their vtables, or not.
	(build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
	indices.  Use size_binop.
	(dfs_build_vcall_offset_vtbl_entries): Don't rely on
	BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
	(build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
	(build_vtable_entry): Mark thunks as needing to be emitted with
	their vtables, or not.
	* decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
	* decl2.c (mark_vtable_entries): Use use_thunk instead of
	* dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
	* error.c (dump_expr): Use BV_FN.
	* mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
	not an int.
	* method.c (make_thunk): Likewise.
	(emit_thunk): Rename to use_thunk.  Allow callers to decide
	whether or not to actually emit the thunk.  Adjust for changes in
	representation of vcall offsets.
	* search.c (dfs_get_pure_virtuals): Use BV_FN.
	* semantics.c (emit_associated_thunks): New function.
	(expand_body): Use it.
	* ir.texi: Adjust decriptions of thunks.

2000-06-22  Jason Merrill  <>

	* pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
	(tsubst_friend_function): Copy it here.

	* decl.c (grok_op_properties): Fix typo.

	* decl2.c (delete_sanity): Clarify warning, avoid failure on
	deleting void*.

	* pt.c (check_explicit_specialization): Clarify error.

	* decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
	an old OVERLOAD when we're declaring a non-function.
	(pushdecl, destroy_local_var): Check for error_mark_node.
	(warn_extern_redeclared_static): Also bail early if
	we're a CONST_DECL.
	(push_overloaded_decl): Ignore an old error_mark_node.

2000-06-22  Nathan Sidwell  <>

	* call.c (build_x_va_arg): Check if in a template decl.
	* pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.

2000-06-20  Alexandre Petit-Bianco  <>

	* class.c (push_lang_context): TYPE_NAME gets you to the Java
	types DECLs.
	* decl.c (check_goto): Computed gotos assumed OK.

2000-06-20  Jason Merrill  <>

	* pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
	for which we don't need to look for instantiations.

2000-06-21  Nathan Sidwell  <>

	* parse.y (program): Always call finish_translation_unit.
	* parse.c, parse.h: Rebuilt.

2000-06-20  Zack Weinberg  <>

	* method.c: Don't include hard-reg-set.h.

2000-06-20  Nathan Sidwell  <>

	* rtti.c (get_base_offset): Cope when vbase field is in a base.

2000-06-20  Nathan Sidwell  <>

	* call.c (build_conditional_expr): Use VOID_TYPE_P.
	* cvt.c (cp_convert_to_pointer): Likewise.
	(convert_to_void): Likewise.
	* error.c (dump_expr): Likewise.
	* except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
	* init.c (build_delete): Likewise.
	* method.c (emit_thunk): Likewise.
	* optmize.c (declare_return_variable): Likewise.
	* rtti.c (get_tinfo_decl_dynamic): Likewise.
	(get_typeid): Likewise.
	(build_dynamic_cast_1): Likewise.
	* typeck.c (composite_pointer_type): Likewise.
	(common_type): Likewise.
	(build_indirect_ref): Likewise.
	(build_binary_op): Likewise.
	(build_x_compound_expr): Likewise.
	(check_return_expr): Likewise.
	* typeck2.c (add_exception_specifier): Likewise.

	* mangle.c (write_method_parms): Use direct comparison for end
	of parmlist.

2000-06-19  Benjamin Chelf  <>

	* cp-tree.h (genrtl_try_block): Declare function.
	(genrtl_handler): Likewise.
	(genrtl_catch_block): Likewise.
	(genrtl_ctor_stmt): Likewise.
	(genrtl_subobject): Likewise.
	(genrtl_decl_cleanup): Likewise.
	(genrtl_do_poplevel): Likewise.
	(genrtl_do_pushlevel): Likewise.
	(genrtl_clear_out_block): Likewise.
	(genrtl_goto_stmt): Likewise.
	(genrtl_expr_stmt): Likewise.
	(genrtl_decl_stmt): Likewise.
	(genrtl_if_stmt): Likewise.
	(genrtl_while_stmt): Likewise.
	(genrtl_do_stmt): Likewise.
	(genrtl_return_stmt): Likewise.
	(genrtl_for_stmt): Likewise.
	(genrtl_break_stmt): Likewise.
	(genrtl_continue_stmt): Likewise.
	(genrtl_scope_stmt): Likewise.
	(genrtl_switch_stmt): Likewise.
	(genrtl_case_label): Likewise.
	(genrtl_begin_compound_stmt): Likewise.
	(genrtl_finish_compound_stmt): Likewise.
	(genrtl_compound_stmt): Likewise.
	(genrtl_asm_stmt): Likewise.
	(genrtl_named_return_value): Likewise.
	(genrtl_begin_stmt_expr): Likewise.
	(genrtl_finish_stmt_expr): Likewise.
	(finish_for_stmt): Removed first argument.
	(finish_switch_stmt): Likewise.

	* semantics.c (genrtl_try_block): Define function.
	(genrtl_handler): Likewise.
	(genrtl_catch_block): Likewise.
	(genrtl_ctor_stmt): Likewise.
	(genrtl_subobject): Likewise.
	(genrtl_decl_cleanup): Likewise.
	(genrtl_do_poplevel): Likewise.
	(genrtl_do_pushlevel): Likewise.
	(genrtl_clear_out_block): Likewise.
	(genrtl_goto_stmt): Likewise.
	(genrtl_expr_stmt): Likewise.
	(genrtl_decl_stmt): Likewise.
	(genrtl_if_stmt): Likewise.
	(genrtl_while_stmt): Likewise.
	(genrtl_do_stmt): Likewise.
	(genrtl_return_stmt): Likewise.
	(genrtl_for_stmt): Likewise.
	(genrtl_break_stmt): Likewise.
	(genrtl_continue_stmt): Likewise.
	(genrtl_scope_stmt): Likewise.
	(genrtl_switch_stmt): Likewise.
	(genrtl_case_label): Likewise.
	(genrtl_begin_compound_stmt): Likewise.
	(genrtl_finish_compound_stmt): Likewise.
	(genrtl_compound_stmt): Likewise.
	(genrtl_asm_stmt): Likewise.
	(genrtl_named_return_value): Likewise.
	(genrtl_begin_stmt_expr): Likewise.
	(genrtl_finish_stmt_expr): Likewise.
	(finish_for_stmt): Removed first argument and generate rtl
	specific code.
	(finish_switch_stmt): Likewise.
	(do_poplevel): Removed generate rtl specific code.
	(do_pushlevel): Likewise.
	(add_tree): Likewise.
	(finish_goto_stmt): Likewise.
	(finish_expr_stmt): Likewise.
	(begin_if_stmt): Likewise.
	(finish_if_stmt_cond): Likewise.
	(finish_then_clause): Likewise.
	(begin_else_clause): Likewise.
	(finish_else_clause): Likewise.
	(finish_if_stmt): Likewise.
	(clear_out_block): Likewise.
	(begin_while_stmt): Likewise.
	(finish_while_stmt_cond): Likewise.
	(finish_while_stmt): Likewise.
	(begin_do_stmt): Likewise.
	(finish_do_body): Likewise.
	(finish_do_stmt): Likewise.
	(finish_return_stmt): Likewise.
	(begin_for_stmt): Likewise.
	(finish_for_init_stmt): Likewise.
	(finish_for_cond): Likewise.
	(finish_for_expr): Likewise.
	(finish_break_stmt): Likewise.
	(finish_continue_stmt): Likewise.
	(begin_switch_stmt): Likewise.
	(finish_switch_cond): Likewise.
	(finish_case_label): Likewise.
	(begin_try_block): Likewise.
	(begin_function_try_block): Likewise.
	(finish_try_block): Likewise.
	(finish_cleanup_try_block): Likewise.
	(finish_cleanup): Likewise.
	(finish_function_try_block): Likewise.
	(finish_handler_sequence): Likewise.
	(finish_function_handler_sequence): Likewise.
	(begin_handler): Likewise.
	(finish_handler_parms): Likewise.
	(begin_catch_block): Likewise.
	(finish_handler): Likewise.
	(begin_compound_stmt): Likewise.
	(finish_compound_stmt): Likewise.
	(finish_asm_stmt): Likewise.
	(finish_label_stmt): Likewise.
	(finish_label_decl): Likewise.
	(finish_subobject): Likewise.
	(finish_decl_cleanup): Likewise.
	(finish_named_return_value): Likewise.
	(begin_stmt_expr): Likewise.
	(finish_stmt_expr): Likewise.

	* decl.c (initialize_local_var): Changed call to finish_expr_stmt
	to call genrtl_expr_stmt when appropriate.

	* init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
	begin_compound_expr to call genrtl_begin_stmt_expr and
	genrtl_begin_compound_expr when appropriate.
	(finish_init_stmts): Changed calls to finish_compound_expr and
	finish_stmt_expr to call genrtl_finish_compound_expr and
	genrtl_finish_stmt_expr when appropriate.
	(expand_default_init): Changed call to finish_expr_stmt to call
	genrtl_expr_stmt when appropriate.
	(build_vec_init): Likewise.

	* parse.y (simple_stmt): Removed first argument from call to
	finish_for_stmt. Removed first argument from call to

	* parse.c: Regenerated.

	* pt.c (tsubst_expr): Removed first argument from call to
	finish_for_stmt. Removed first argument from call to

2000-06-16  Benjamin Chelf  <>

	* cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
	CP_DUMMY_TREE_CODE. Remove #include "c-common.def".

	* lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
	(cplus_tree_code_length[]): Likewise.
	(cplus_tree_code_name[]): Likewise.
	(init_parse): Added call to add_c_tree_codes. Changed

2000-06-16  Mark Mitchell  <>

	* cp-tree.h (finish_mem_initializers): Declare.
	(count_trees): Likewise.
	* parse.y (base_init): Use finish_mem_initializers.
	* semantics.c (finish_mem_initializers): New function.

	* tree.c (count_trees_r): Prototype.  Use DATA parameter to store
	the number of trees.
	(n_trees): Remove.
	(count_trees): Don't use it.

2000-06-15  Jason Merrill  <>

	* tree.c (count_trees): New debugging function.

	* typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
	* init.c (build_member_call): Pull out the name of a DECL.

	* (semantics.o, pt.o): Depend on TIMEVAR_H.
	* semantics.c (expand_body): Push to TV_INTEGRATION here.
	* optimize.c (optimize_function): Not here.
	* pt.c (instantiate_decl): Push to TV_PARSE.

2000-06-15  Mark Mitchell  <>

	* cp-tree.h (struct language_function): Remove x_base_init_list
	and x_member_init_list.
	(current_base_init_list): Remove.
	(current_member_init_list): Likewise.
	(setup_vtbl_ptr): Change prototype.
	(emit_base_init): Likewise.
	(expand_member_init): Likewise.
	(reinit_parse_for_function): Remove.
	* decl.c (save_function_data): Don't clear x_base_init_list and
	(mark_language_function): Don't mark them.
	* init.c (perform_member_init): Tweak comment.
	(sort_member_init): Take the list of initializers as an argument.
	(sort_base_init): Likewise.
	(emit_base_init): Likewise.
	(expand_member_init): Return the initializer.  Don't use global
	* lex.c (reinit_parse_for_function): Remove.
	* method.c (build_template_parm_names): Correct substitution.
	(do_build_copy_constructor): Don't use current_member_init_list
	and current_base_init_list.
	(synthesize_method): Likewise.
	* parse.y (base_init): Split mem-initializers into
	base-initializers and field-initializers.
	(member_init_list): Build up the list here.
	(member_init): Return the initializer.
	(fn.depfn): Don't use reinit_parse_for_function.
	* parse.c: Regenerated.
	* pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
	(tsubst_expr): Don't use current_member_init_list
	and current_base_init_list.
	(tsubst_expr_values): Rename to ...
	(tsubst_initializer_list): ... this.  Use convert_from_reference.
	* semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
	and current_base_init_list.
	(begin_function_definition): Don't call reinit_parse_for_function.

	* dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.

	* error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE

	* cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.

2000-06-14  Benjamin Chelf  <>

	* cp-tree.h (IF_COND): Move to c-common.h.
	(THEN_CLAUSE): Likewise.
	(ELSE_CLAUSE): Likewise.
	(WHILE_COND): Likewise.
	(WHILE_BODY): Likewise.
	(DO_COND): Likewise.
	(DO_BODY): Likewise.
	(RETURN_EXPR): Likewise.
	(EXPR_STMT_EXPR): Likewise.
	(FOR_INIT_STMT): Likewise.
	(FOR_COND): Likewise.
	(FOR_EXPR): Likewise.
	(FOR_BODY): Likewise.
	(SWITCH_COND): Likewise.
	(SWITCH_BODY): Likewise.
	(CASE_LOW): Likewise.
	(CASE_HIGH): Likewise.
	(COMPOUND_BODY): Likewise.
	(ASM_CV_QUAL): Likewise.
	(ASM_STRING): Likewise.
	(ASM_OUTPUTS): Likewise.
	(ASM_INPUTS): Likewise.
	(ASM_CLOBBERS): Likewise.
	(DECL_STMT_DECL): Likewise.
	(STMT_EXPR_STMT): Likewise.
	(LABEL_STMT_LABEL): Likewise.
	(SCOPE_BEGIN_P): Likewise.
	(SCOPE_END_P): Likewise.
	(SCOPE_STMT_BLOCK): Likewise.
	(SCOPE_PARTIAL_P): Likewise.
	(ASM_VOLATILE_P): Likewise.
	(STMT_LINENO): Likewise.
	(STMT_LINENO_FOR_FN_P): Likewise.

	* cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,

	* (CXX_TREE_H): Added $(srcdir)/../c-common.def.

	* (CXX_SRCS): Added $(srcdir)/c-common.def.
	(cc1plus$(exeext)): Added $(srcdir)/c-common.def.

	* lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
	(cplus_tree_code_length[]): Added '#include "c-common.def"'.
	(cplus_tree_code_name[]): Added '#include "c-common.def"'.

2000-06-14  Mark Mitchell  <>

	* cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
	* class.c (dfs_find_final_overrider): Set it appropriately.
	(dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
	avoid unneeded secondary vptrs.

2000-06-13  Jakub Jelinek  <>

	* class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
	(check_bitfield_decl, check_field_decl): Likewise.
	(build_vtbl_or_vbase_field, build_base_field): Likewise.
	(layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
	* decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
	(xfer_tag, finish_enum): Likewise.
	* decl2.c (finish_builtin_type): Likewise.
	* init.c (init_init_processing): Likewise.
	* pt.c (instantiate_class_template): Likewise.
	* rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
	* cp-tree.h (struct lang_type): Add user_align member.

Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <>

	* (c++.install-common): Install g++-cross in
	$(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
	$(target_alias)-g++ and $(target_alias)-c++.

2000-06-12  Mark Mitchell  <>

	* class.c (vcall_offset_data_s): Add last_init and fns.
	(overrides): Rename to same_signature_p.
	(dfs_find_final_overrider): Adjust accordingly.
	(mark_overriders): Likewise.
	(warn_hidden): Likewise.
	(build_vtbl_initializer): Reorganize machinery for building things
	at negative offsets.
	(build_vcall_and_vbase_vtbl_entries): Likewise.
	(build_vbase_offset_vtbl_entries): Likewise.
	(dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
	offset entries.  Do not create two entries for functions with the
	same signature.
	(build_vcall_offset_vtbl_entries): Initialize vod->fns.
	(build_rtti_vtbl_entries): Reorganize machinery for building things
	at negative offsets.

	* optimize.c (expand_call_inline): Don't recurse into the code
	used to initialize the parameters more than once.

2000-06-11  Mark Mitchell <>

	* mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
	(is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
	(find_substitution): Only use the `Sa' substitution for
	std::allocator, not instantiations of it.
	(write_template_prefix): Move comment.  Only use a TREE_LIST to
	represent substitutions for a member template.
	(write_array_type): Mangle array dimensions correctly.
	* optimize.c (maybe_clone_body): Copy more information from the
	cloned function.
	* pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
	on the regenerated declaration.

2000-06-11  Chip Salzenberg  <>
	    Mark Mitchell <>

	* class.c (build_vtable): Clarify comment.
	(build_ctor_vtbl_group): Pass the most derived type to

2000-06-11  Kaveh R. Ghazi  <>

	* decl2.c (compare_options): Don't needlessly cast away const-ness.

2000-06-10  Mark Mitchell  <>

	* decl.c (add_binding): Handle duplicate declarations of external

2000-06-09  Chip Salzenberg  <>
	    Mark Mitchell <>

	* mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
	(write_signed_number): New macro.
	(write_unsigned_number): Likewise.
	(write_source_name): Use them.
	(write_number): Handle signed and unsigned values.
	(write_integer_cst): Use tree_int_cst_sgn, and use
	write_unsigned_number or write_signed_number as appropriate.
	(write_discriminator): Use write_unsigned_number or
	write_signed_number as appropriate.
	(write_template_arg_literal): Likewise.
	(write_array_type): Use tree_low_cst.
	(write_template_parm):  Use write_unsigned_number or
	write_signed_number as appropriate.
	(write_substitution): Adjust call to write_number.
	(write_type): Get the TYPE_MAIN_VARIANT before mangling it.
	(write_expression): Handle non-type template arguments of
	reference type correctly.
	(mangle_thunk): Use write_signed_number.

2000-06-09  Chip Salzenberg  <>

	* mangle.c (find_substition): Don't mangle objects with typename
	substitutions (e.g. "cin" as "Si").

2000-06-09  Zack Weinberg  <>

	* call.c (add_candidate): Use ggc_alloc_cleared.
	* decl.c (lookup_label): Likewise.
	* lex.c (retrofit_lang_decl): Likewise.

2000-06-09  Jason Merrill  <>

	* semantics.c (expand_body): Push to TV_EXPAND.
	* optimize.c (optimize_function): Push to TV_INTEGRATION.
	* decl.c (start_function): Always call announce_function.

	* Just declare abort.

2000-06-09  Gabriel Dos Reis  <>

	* lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
	whenever @ is a symbolic name.

2000-06-08  Jakub Jelinek  <>

	* method.c (make_thunk): Clear DECL_VTT_PARM in thunk.

2000-06-07  Mark Mitchell  <>

	* decl.c (pushdecl): Look up functions by DECL_NAME, not

2000-06-06  Mark Mitchell  <>

	* decl2.c (c_language): Define.

2000-06-06  Gabriel Dos Reis  <>

	* lex.c (lang_init_options): Tweak.

	* decl2.c: Remove #inclusion of diagnostic.h
	(lang_decode_option): Move diagnostic formatting options to

	* lang-options.h: Remove documentation for diagnostic options.

	* (lex.o): Depends upon diagnostic.h

2000-06-06  Mark Mitchell  <>

	* decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
	the same DECL_RESULT, it's not a redefinition.
	* pt.c (tsubst_decl): Remove code to handle illegal

2000-06-06  Nathan Sidwell  <>

	* (__eh_alloc, __eh_free): Moved to libgcc2.c

2000-06-05  Jason Merrill  <>

	* search.c (maybe_suppress_debug_info): Don't check

	* pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
	here if extern_p.

	Remember instantiation context in deferred instantiations.
	* cp-tree.h (struct tinst_level): Remove.
	* pt.c (current_tinst_level): Now a tree.
	(print_template_context, push_tinst_level, pop_tinst_level,
	tinst_for_decl): Adjust.
	(reopen_tinst_level): New fn.
	(init_pt): Register current_tinst_level as a root.
	(add_pending_template): Put current_tinst_level in TREE_PURPOSE
	of the pending templates list.
	(instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
	* lex.c (extract_interface_info): Adjust.
	* decl2.c (warn_if_unknown_interface): Adjust.

2000-06-05  Mark Mitchell  <>

	* class.c (indirect_primary_base_p): New function.
	(determine_primary_base): Use it.

2000-06-05  Nathan Sidwell  <>

	Update new-abi dynamic cast algorithm.
	* (__class_type_info::__dyncast_result): Add
	whole_details. Adjust constructor.
	(__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
	Avoid unnecessary searching.
	(__dynamic_cast): Adjust for __dyncast_result::whole_details.

Mon Jun  5 06:48:55 2000  Richard Kenner  <>

	* decl.c (init_decl_processing): Don't call record_component_aliases.
	* tree.c (build_cplus_array_type_1): Likewise.

2000-06-04  Mark Mitchell  <>

	* ir.texi: Correct typo.
	* mangle.c (write_expression): Handle non-type template arguments
	with reference type.
	* method.c (build_overload_value): Likewise.
	* pt.c (convert_nontype_argument): Explicitly represent conversion
	to a reference with an ADDR_EXPR.
	(unify): Always unify arguments in left-to-right order.

2000-06-03  Alex Samuel    <>
	    Mark Mitchell  <>

	* (CXX_SRCS): Add mangle.c.
	* (CXX_OBJS): Add mangle.o.
	(mangle.o): New rule.

	* class.c (local_classes): New variable.
	* class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
	(get_vtt_name): Use mangle_vtt_name for new ABI.
	(init_class_processing): Initialize local_classes.
	(build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
	* cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
	(std_identifier): New macro.
	(local_classes): Declare.
	(get_mostly_instantiated_function_type): Declare.
	(init_mangle): Declare.
	(mangle_decl): Likewise.
	(mangle_type_string): Likewise.
	(mangle_type): Likewise.
	(mangle_typeinfo_for_type): Likewise.
	(mangle_typeinfo_string_for_type): Likewise.
	(mangle_vtbl_for_type): Likewise.
	(mangle_vtt_for_type): Likewise.
	(mangle_ctor_vtbl_for_type): Likewise.
	(mangle_thunk): Likewise.
	(mangle_conv_op_name_for_type): Likewise.
	(mangle_guard_variable): Likewise.
	* decl.c (pushtag): Keep track of local classes.
	(initialize_predefined_identifiers): Initialize std_identifier.
	(init_decl_processing): Use std_identifier.
	(start_decl): Don't treat instantiations as specializations.
	(grokdeclarator): Likewise.
	(grokvardecl): Call mangle_decl for new ABI.  Only set mangled
	name for fully-instantiated templates.
	* decl2.c (grokclassfn): Use set_mangled_name_for_decl for
	destructors with the new ABI.
	(finish_static_data_member_decl): Use mangle_decl under the new ABI.
	(grokfield): Use mangle_type for new ABI.
	(grokoptypename): Use mangle_conv_op_for_type for new ABI.
	(get_sentry): Use mangle_guard_variable for new ABI.
	(start_static_initialization_or_destruction): Likewise.
	* expr.c (extract_aggr_init): Remove.
	(extract_scalar_init): Likewise.
	(extract_init): Remove #if 0'd code.
	* mangle.c: New function.
	* method.c (build_mangled_name): Assert not flag_new_abi.
	(build_static_name): Likewise.
	(build_decl_overload_real): Likewise.
	(build_typename_overload): Likewise.
	(build_overload_with_type): Likewise.
	(build_overload_name): Likewise.
	(get_ctor_vtbl_name): Likewise.
	(start_squangling): Likewise.
	(get_id_2): Likewise.
	(set_mangled_name_for_decl): Call mangle_decl for new ABI.
	(init_method): Call init_mangle for new ABI.
	(make_thunk): Call mangle_thunk for new ABI.
	* operators.def: Correct new ABI manglings for the `%' operator.
	Add `::' operator.
	* pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
	(lookup_template_class): Call mangle_decl for new ABI.
	(get_mostly_instantiated_function_type): New function.
	(set_mangled_name_for_template_decl): Use it.
	(tsubst_decl): Use set_mangled_name_for_decl for destructors with
	the new ABI.  Use mangle_conv_op_name_for_type for instantiated
	conversion op names.
	* rtti.c (tinfo_name): Call mangle_type_string for new ABI.
	(get_tinfo_decl): Call mangle_typeinfo_for_type for new	ABI.
	(tinfo_base_init):  Likewise.  Mangle typeinfo string name with

2000-06-03  Mark Mitchell  <>

	* cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
	(innermost_args): Remove.
	(get_innermost_template_args): New function.
	* decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
	* error.c (dump_function_decl): Be caution when using
	* method.c (build_template_parm_names):  Use
	* pt.c (add_to_template_args): Tidy comment
	(get_innermost_template_args): New function.
	(check_explicit_specialization): Clear DECL_INITIAL for a new
	(process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
	(push_template_decl): Always register specializations of the most
	general template.
	(convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
	(coerce_template_parms): Likewise.
	(lookup_template_class): Likewise.
	(innermost_args): Remove.
	(tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
	(tsubst_decl): Handle tricky specializations.  Use
	(instantiate_template): Simplify handling of partial
	(get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
	(most_general_template): Reimplement, in a more straightforward
	(regenerate_decl_from_template): Tweak formatting.  Use
	TMPL_ARGS_DEPTH for clarity.
	(set_mangled_name_for_template_decl): Use INNERMOST_ARGS.

	* dump.c (dequeue_and_dump): Dump information about thunks.

2000-06-01  Richard Henderson  <>

	* decl.c (init_decl_processing): Set lang_get_alias_set first thing.

2000-06-01  Richard Henderson  <>

	* decl2.c (unsupported_options): Fix typo, make const.
	(lang_decode_option): Fix bsearch argument order.

2000-06-01  Mark Mitchell  <>

	* init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE

Wed May 31 14:09:00 2000  Richard Kenner  <>

	* cp-tree.h (c_get_alias_set): Deleted.
	* (decl.o): Include ../expr.h.
	* decl.c (expr.h): Include.
	(init_decl_processing): Call record_component_aliases for arrays.
	(grokdeclarator): Likewise.
	Set TREE_ADDRESSABLE for fields that aren't bitfields.
	* tree.c (build_cplus_array_type_1): Call record_component_aliases.

2000-05-31  Mark Mitchell  <>

	Remove guiding declaration support.
	* cp/cp-tree.h (flag_dump_translation_unit): Make it const.
	(flag_guiding_decls): Remove.
	* call.c (build_user_type_conversion_1): Remove support for
	guiding decls.
	(build_new_function_call): Likewise.
	(build_new_op): Likewise.
	(build_new_method_call): Likewise.
	* decl.c (start_function): Likewise.
	* friend.c (is_friend): Likewise.
	(do_friend): Likewise.
	* decl2.c ((flag_dump_translation_unit): Make it const.
	(flag_guiding_decls): Remove.
	(unsupported_options): New variable
	(compare_options): New function.
	(lang_decode_option): Use them.

	* decl.c (build_cp_library_fn): Set DECL_CONTEXT.

	* method.c (mangle_expression): Adjust test for legal expression

	* pt.c (instantiate_decl): Save and restore the local
	specializations list.

2000-05-30  Jason Merrill  <>

	* decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.

2000-05-30  Mark Mitchell  <>

	* call.c (add_template_candidate_real): Handle member template
	constructors for classes with virtual bases.
	(build_user_type_conversion_1): Use in_charge_arg_for_name.
	(build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.

	* ir.texi: Update thunk documentation.

	* call.c (joust): Fix handling of overloaded builtin operators.

2000-05-30  Zack Weinberg  <>

	* cp-tree.h (DECL_ANTICIPATED): New macro.
	Document new use of DECL_LANG_FLAG_7.
	* decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
	in the user namespace.
	* lex.c (do_identifier): If the identifier's declaration has
	DECL_ANTICIPATED on, it has not yet been declared.  But do not
	replace it with an ordinary implicit declaration.

	* Include stdlib.h.

2000-05-29  Mark Mitchell  <>

	* cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
	* class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not

2000-05-28  Gabriel Dos Reis  <>

	* decl2.c (lang_decode_option): Use skip_leading_substring instead
	of plain strncmp.

2000-05-28  Alexandre Oliva  <>

	* operators.def (<?): Duplicated, should have been...
	(>?): this.  Fixed.

2000-05-27  Alex Samuel    <>
	    Mark Mitchell  <>

	* cp-tree.h (ansi_opname): Make it a macro.
	(ansi_assopname): Likewise.
	(struct lang_decl_flags): Add assignment_operator_p.
	(struct lang_decl): Add operator_code.
	(DECL_VTT_PARM): Adjust.
	(DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
	overloaded operator.
	(opname_tab): Remove.
	(assignop_tab): Likewise.
	(operator_name_info_t): New type.
	(operator_name_info): New variable.
	(assignment_operator_name_info): Likewise.
	(build_cp_library_fn): Remove declaration.
	(push_cp_library_fn): Likewise.
	(operator_name_string): Likewise.
	(build_decl_overload): Likewise.
	* call.c (print_z_candidates): Simplify.
	(build_object_call): Adjust usage of ansi_opname.  Use
	(op_error): Adjust operator name lookup.
	(build_conditional_expr): Adjust usage of ansi_opname.
	(build_new_op): Likewise.
	(build_op_delete_call): Likewise.
	(build_over_call): Likewise.
	* decl.c (duplicate_decls): Copy operator_code.
	(init_decl_processing): Adjust parameters to push_cp_library_fn.
	(builtin_function): Adjust parameters to build_library_fn_1.
	(build_library_fn_1): Accept an overloaded operator code.
	(build_library_fn): Pass ERROR_MARK.
	(build_cp_library_fn): Accept an overloaded operator code.
	(push_cp_library_fn): Likewise.
	(grokfndecl): Tweak.
	(grokdeclarator): Simplify code to compute names of overloaded
	operators.  Adjust use of ansi_opname.
	(ambi_op_p): Work on tree_codes, not identifiers.
	(unary_op_p): Likewise.
	(grok_op_properties): Likewise.
	(start_function): Use DECL_OVERLOADED_OPERATOR_P.
	(lang_mark_tree): Don't try to mark the operator_code.
	* decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
	* error.c (dump_decl): Remove special handling for operator
	(dump_function_name): Likewise.
	(dump_expr): Adjust name lookup of operators.
	(op_to_string): Simplify.
	(assop_to_string): Likewise.
	* init.c (build_new_1): Adjust use of ansi_opname.
	* lex.c (opname_tab): Remove.
	(assignop_tab): Likewise.
	(ansi_opname): Likewise.
	(ansi_assopname): Likewise.
	(operator_name_string): Likewise.
	(reinit_lang_specific): Likewise.
	(operator_name_info): New variable.
	(assignment_operator_name_info): Likewise.
	(init_operators): New function.
	(init_parse): Use it.
	(do_identifier): Adjust use of ansi_opname.
	* method.c (mangle_expression): Don't use ansi_opname for
	(build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
	(build_decl_overload): Remove.
	(build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
	(do_build_assign_ref): Adjust use of ansi_opname.
	(synthesize_method): Likewise.
	(implicitly_declare_fn): Likewise.
	* operators.def: New file.
	* parse.y (operator): Adjust use of ansi_opname.
	* pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
	(set_mangled_name_for_template_decl): Don't play games with
	(special_function_p): Adjust use of ansi_opname.
	* typeck.c (check_return_expr): Likewise.
	* (cc1plus): Depend on operators.def.
	* (lex.o): Likewise.
	(decl.o): Likewise.

2000-05-27  Zack Weinberg  <>

	* (cplib2.ready): Eradicate.

Sat May 27 11:25:46 2000  Richard Kenner  <>

	* method.c (mangle_expression): Use TREE_CODE_LENGTH.
	* tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
	(built_min, cp_tree_equal): Likewise.

2000-05-26  Mark Mitchell  <>

	* class.c (layout_nonempty_base_or_field): Replace
	`record_layout_info' with `record_layout_info_s'.

2000-05-26  Jason Merrill  <>

	Fix goto checking.
	* cp-tree.h (struct language_function): x_named_labels is now
	a struct named_label_list*.
	* decl.c (struct named_label_use_list): Renamed from...
	(struct named_label_list): ...this.  New struct.
	(push_binding_level): Don't set eh_region.
	(note_level_for_eh): New fn.
	(pop_label): Take label and old value directly.
	(pop_labels): Adjust for new named_labels format.
	(lookup_label): Likewise.
	(poplevel): Note characteristics of a binding level containing a
	named label.  Mess with named label lists earlier.
	(mark_named_label_lists): New fn.
	(mark_lang_function): Call it.
	(use_label): New fn, split out from...
	(make_label_decl):  Don't call it.
	(decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
	check_previous_gotos): New fns,	split out from...
	(check_switch_goto): New fn.
	(define_case_label): Call it.
	(check_goto): New fn.
	* semantics.c (finish_goto_stmt): Call it and use_label.
	(begin_compound_stmt): If we're a try block, call note_level_for_eh.
	(expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.

2000-05-26  Mark Mitchell  <>

	* class.c (build_vtable_entry_ref): Correct usage of

	* decl2.c (grokclassfn): Set DECL_LANGUAGE here.
	* method.c (implicitly_declare_fn): Not here.

2000-05-26  Nathan Sidwell  <>

	* cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
	(CPTI_PTMD_DESC_TYPE): ... here.
	(ptmd_desc_type_node): Rename to ...
	(ptm_desc_type_node): ... here.
	* decl.c: Likewise.
	* rtti.c (ptmd_initializer): Rename to ...
	(ptm_initializer): ... here.
	(sythesize_tinfo_var): Adjust. Deal with pointer to member
	(create_tinfo_types): Adjust.

2000-05-25  Mark Mitchell  <>

	Finish implementation of VTTs.
	* cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
	(vtt_parm_identifier): New macro.
	(vtt_parm_type): Likewise.
	(BINFO_VPTR_INDEX): Likewise.
	(struct lang_decl): Add vtt_parm.
	(DECL_VTT_PARM): New macro.
	(DECL_USE_VTT_PARM): Likewise.
	(get_vtt_name): Declare.
	(build_artificial_parm): Likewise.
	(fixup_all_virtual_upcast_offsets): Likewise.
	(expand_indirect_vtbls_init): Remove.
	* call.c (build_new_method_call): Pass the vtt to subobject
	constructors and destructors.
	* class.c (get_vtt_name): Give it external linkage.
	(build_clone): Handle the magic VTT parameters for clones.
	(clone_function_decl): Fix typo in comment.
	(build_vtt): Keep track of the indices in the VTTs where various
	entities are stored.
	(build_vtt_inits): Likewise.
	(dfs_build_vtt_inits): Likewise.
	(build_ctor_vtbl_group): Tweak type of construction vtables.
	(dfs_accumulate_vtbl_inits): Build vtables for all bases, even
	primary bases, when building construction vtables.
	* decl.c (duplicate_decls): Handle DECL_VTT_PARM.
	(initialize_predefined_identifiers): Add vtt_parm_identifier.
	(init_decl_processing): Initialize vtt_parm_type.
	(lang_mark_tree): Make vtt_parm.
	* decl2.c (build_artificial_parm): New function.
	(maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
	(grokclassfn): Use build_artificial_parm.
	* init.c (initialize_vtbl_ptrs): Call
	fixup_all_virtual_upcast_offsets directly.
	(perform_member_init): Use the complete subobject destructor for
	member cleanups.
	(build_vtbl_address): New function.
	(expand_virtual_init): Handle VTTs.
	* optimize (maybe_clone_body): Likewise.
	* search.c (fixup_all_virtual_upcast_offsets): Give it external
	(expand_indirect_vtbls_init): Remove.
	* semantics.c (setup_vtbl_ptr): Fix typos in comment.
	* tree.c (make_binfo): Make them bigger.

2000-05-25  Nathan Sidwell  <>

	* inc/cxxabi.h (__pbase_type_info): Define, based on
	(__pointer_type_info): Derive from __pbase_type_info. Adjust.
	(__pointer_to_member_type_info): Likewise.
	* (__pbase_type_info::~__pbase_type_info): Implement.
	(__pointer_to_member_type_info::__is_pointer_p): Remove.
	(__pointer_type_info::__do_catch): Rename to ...
	(__pbase_type_info::__do_catch): ... here. Adjust.
	(__pbase_type_info::__pointer_catch): Implement.
	(__pointer_type_info::__pointer_catch): Adjust.
	(__pointer_to_member_type_info::__pointer_catch): Adjust.

2000-05-25  Nathan Sidwell  <>

	* tinfo.h (__user_type_info::contained_virtual_p): New
	* (__user_type_info::do_upcast): Fix bug with diamond
	shaped hierarchy.
	(__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
	diamond shaped hierarchy. Add early out for mixed diamond and
	duplicate shaped hierarchy.

2000-05-24  Mark Mitchell  <>

	* cp-tree.h (build_delete): Change prototype.
	(build_vec_delete): Likewise.
	* call.c (build_scoped_method_call): Use special_function_kind
	values to indicate the kind of destruction to be done.
	(build_method_call): Likewise.
	* decl.c (finish_destructor_body): Likewise.
	(maybe_build_cleanup_1): Likewise.  Rename to ...
	(maybe_build_cleanup): ... this.
	* decl2.c (delete_sanity): Use special_function_kind
	values to indicate the kind of destruction to be done.
	(build_cleanup): Likewise.
	* init.c (perform_member_init): Likewise.
	(build_vec_delete_1): Likewise.
	(build_dtor_call): Simplify.
	(build_delete): Use special_function_kind
	values to indicate the kind of destruction to be done.
	(build_vbase_delete): Likewise.
	(build_vec_delete): Likewise.

	* init.c (sort_member_init): Fix typo in error message generation

Mon May 15 11:46:29 2000  Donald Lindsay  <>

	* semantics.c (begin_class_definition): make the packed
	attribute be sensitive to the "-fpack-struct" command line flag

2000-05-24  Nathan Sidwell  <>

	Update new-abi upcast algorithm.
	* inc/cxxabi.h (__class_type_info::__do_upcast): Change
	prototype and meaning of return value.
	(__si_class_type_info::__do_upcast): Likewise.
	(__vmi_class_type_info::__do_upcast): Likewise.
	* (__class_type_info::__upcast_result): Replace
	whole2dst with part2dst. Adjust ctor.
	(__class_type_info::__do_upcast): Adjust call of worker function.
	(__class_type_info::__do_upcast): Adjust.
	(__si_class_type_info::__do_upcast): Adjust. Use parent's
	(__vmi_class_type_info::__do_upcast): Likewise. Fix private
	virtual base in diamond hierarchy bug.

2000-05-23  Mark Mitchell  <>

	* cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
	and bitfield to tinfo_fn_p.
	(DECL_TINFO_FN_P): Adjust.
	(SET_DECL_TINFO_FN_P): Likewise.
	(DECL_MUTABLE_P): Likewise.
	(DECL_C_BIT_FIELD): Likewise.
	(SET_DECL_C_BIT_FIELD): Likewise.
	* class.c (alter_access): Call retrofit_lang_decl if ncessary.
	(handle_using_decl): Remove assertion.
	(build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
	to build FIELD_DECLs.
	(build_base_field): Likewise.
	(layout_class_type): Likewise.
	* decl.c (init_decl_processing): Likewise.
	(build_ptrmemfunc_type): Likewise.
	(grokdeclarator): Likewise.
	* decl2.c (grok_x_components): Likewise.
	* except.c (call_eh_info): Likewise.
	* init.c (init_init_processing): Likewise.
	* rtti.c (expand_class_desc): Likewise.
	(create_pseudo_type_info): Likewise.
	(get_vmi_pseudo_type_info): Likewise.
	(create_tinfo_types): Likewise.
	* ptree.c (print_lang_decl): Adjust.
	* typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
	before checking DECL_MUTABLE_P.

	* decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
	parameters for template functions.
	* pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
	destructors as well as constructors.

2000-05-22  Mark Mitchell  <>

	* class.c (build_ctor_vtbl_group): Set inits.
	* optimize.c (maybe_clone_body): Set DECL_INLINE and
	DECL_THIS_INLINE appropriately for clones.

	* cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
	(DECL_CONV_FN_P): Simplify.
	(language_to_string): Declare.
	* decl.c (duplicate_decls): Fix typo in comment.
	(grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
	(grok_op_properties): Use DECL_CONV_FN_P instead of
	* dump.c (dequeue_and_dump): Dump the language linkage of
	* error.c (language_to_string): Give it external linkage.
	* method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
	(implicitly_declare_fn): Set DECL_LANGUAGE.
	* pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
	(tsubst_decl): Likewise.
	(tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
	* semantics.c (finish_member_declaration): Don't mark members of
	classes declared in an extern "C" region as extern "C".

2000-05-22  Martin v. L÷wis  <>

	* decl2.c (qualified_lookup_using_namespace): Look through
	namespace aliases.

	* decl.c (push_using_decl): Return the old decl on namespace level.

2000-05-21  Mark Mitchell  <>

	* cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
	(VTT_NAME_PREFIX): New macro.
	(get_ctor_vtbl_name): New function.
	* class.c (get_vtable_name): Simplify.
	(get_vtt_name): New function.
	(get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
	(dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
	when a virtual base becomes primary.
	(finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
	(finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
	additional parameters.
	(dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
	(initialize_array): New function.
	(build_vtt): Likewise.
	(build_vtt_inits): Likewise.
	(dfs_build_vtt_inits): Likewise.
	(dfs_fixup_binfo_vtbls): Likewise.
	(build_ctor_vtbl_group): Likewise.
	(initialize_vtable): Use initialize_array.
	(accumulate_vtbl_inits): Reimplement to handle construction
	(dfs_accumulate_vtbl_inits): Likewise.
	(bulid_vtbl_initializer): Adjust parameter name.
	* method.c (build_typename_overload): Remove #if 0'd code.
	(get_ctor_vtbl_name): New function.
	* search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
	(init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.

	* cp-tree.h (struct lang_type): Remove search_slot.
	(emit_base_init): Change prototype.
	(initialize_vtbl_ptrs): Likewise.
	(expand_indirect_vtbls_init): Likewise.
	(clear_search_slots): Remove.
	* decl.c (lang_mark_tree): Don't mark search_slot.
	* init.c (initialize_vtbl_ptrs): Simplify.
	(emit_base_init): Likewise.
	* search.c (struct vbase_info): Document decl_ptr.
	(convert_pointer_to_single_level): Remove.
	(dfs_find_vbases): Remove.
	(dfs_init_base_pointers): Simplify.
	(dfs_clear_vbase_slots): Remove.
	(dfs_vtable_path_unmark): New function.
	(init_vbase_pointers): Simplify.
	(expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
	(expand_indirect_vtbls_init): Simplify.  Don't call
	* semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and

2000-05-20  Zack Weinberg  <>

	* except.c: Add static prototypes.

2000-05-20  H.J. Lu  <>

	* (cplib2.ready): Also depend on cc1plus$(exeext).

2000-05-19  Mark Mitchell  <>

	Don't create a separate copy of virtual bases for the
	* cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
	(binfo_for_vbase): New function.
	* class.c (build_vbase_pointer_fields): Use binfo_for_vbase
	instead of BINFO_FOR_VBASE.
	(build_vbase_pointer): Likewise.
	(build_secondary_vtable): Likewise.
	(dfs_mark_primary_bases): Likewise.
	(mark_primary_bases): Likewise.
	(layout_nonempty_base_or_field): Likewise.
	(dfs_set_offset_for_shared_vbases): Likewise.
	(dfs_set_offset_for_unshared_vbases): Likewise.
	(layout_virtual_bases): Likewise.  Adjust for changes to the
	(dump_class_hierarchy_r): Use binfo_for_vbase
	instead of BINFO_FOR_VBASE.
	(dump_class_hierarchy): Likewise.
	(finish_vtbls): Likewise.
	(build_vtbl_initializer): Adjust for changes to the
	(build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
	* decl.c (finish_destructor_body): Adjust for changes to the
	* init.c (sort_base_init): Use binfo_for_vbase.
	(construct_virtual_bases): Adjust for changes to the
	(expand_member_init): Use binfo_for_vbase.
	(build_vbase_delete):  Adjust for changes to the
	* method.c (do_build_copy_constructor): Likewise.
	* rtti.c (get_base_offset): Use binfo_for_vbase.
	(expand_class_desc): Remove #if 0'd code.
	* search.c (struct vbase_info): Remove vbase_types.
	(get_base_distance):  Use binfo_for_vbase.
	(lookup_field_queue_p): Use CANONICAL_BINFO.
	(get_shared_vbase_if_not_primary): Use binfo_for_vbase.
	(get_pure_virtuals): Adjust for changes to the
	(dfs_find_vbases): Use binfo_for_vbase.
	(dfs_init_vbase_pointers): Likewise.
	(init_vbase_pointers): Don't initialize vi.vbase_types.
	(virtual_context): Use binfo_for_vbase.
	(fixup_all_virtual_upcast_offsets): Adjust for changes to the
	(expand_indirect_vtbls_init): Simplify.
	(dfs_get_vbase_types): Don't replicate virtual bases.
	(find_vbase_instance): Use binfo_for_vbase.
	(binfo_for_vbase): New function.
	* typeck.c (get_delta_difference): Use binfo_for_vbase.

2000-05-17  Mark Mitchell  <>

	* decl2.c (finish_anon_union): Generalize error messages to handle
	anonymous structures.
	* init.c (perform_member_init): Remove `name' parameter.
	(build_field_list): New function.
	(sort_member_init): Handle anonymous union initialization order
	correctly.  Check for multiple initializations of the same union.
	(emit_base_init): Don't look up fields by name here.
	(expand_member_init): Record the result of name lookup for future
	* typeck.c (build_component_ref): Fix formatting.

Wed May 17 17:27:44 2000  Andrew Cagney  <>

	* decl.c (pop_label): Replace warn_unused with warn_unused_label.
	* typeck.c (build_x_compound_expr): Replace warn_unused with

	* decl2.c (lang_decode_option): Update -Wall unused flags by
	calling set_Wunused.

2000-05-16  Mark Mitchell  <>

	* cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
	* init.c (dfs_vtable_path_unmark): Remove.
	* search.c (marked_new_vtable_p): Likewise.
	(unmarked_new_vtable_p): Likewise.
	(dfs_search_slot_nonempty_p): Likewise.
	(dfs_mark): Likewise.
	(dfs_vtable_path_unmark): Likewise.
	(dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
	(dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
	(dfs_init_vbase_pointers): Remove special-case new ABI code.
	(dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
	(init_vbase_pointers): Simplify.
	(expand_indirect_vtbls_init): Likewise.

	* class.c (copy_virtuals): New function.
	(build_primary_table): Use it.
	(build_secondary_vtable): Likewise.
	(modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
	indicate that no vcall offset is required.
	(add_virtual_function): Likewise.
	(modify_all_vtables): Likewise.
	(dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
	(dfs_accumulate_vtbl_inits): Likewise.
	(build_vtbl_initializer): Make changes to handle construction
	(dfs_build_vcall_offset_vtbl_entries): Likewise.
	(build_rtti_vtbl_entries): Likewise.
	(build_vtable_entries): Handle a NULL vcall_index.

2000-05-15  Gabriel Dos Reis  <>

	* decl2.c (lang_decode_option): Fix thinko.

2000-05-14  Jason Merrill  <>

	* except.c (check_handlers): New fn.
	* cp-tree.h: Declare it.
	* semantics.c (finish_handler_sequence): Call it.
	(finish_function_handler_sequence): Likewise.
	(finish_handler_parms): Set TREE_TYPE on the handler.
	* cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
	* search.c (get_base_distance_recursive): If protect>1, ignore
	special access.
	(get_base_distance): Don't reduce watch_access.

2000-05-13  Gabriel Dos Reis <>

	* lex.c: #include diagnostic.h.
	(lang_init_options): Set default prefixing rules.

	* lang-options.h: Add -fdiagnostics-show-location=.

	* decl2.c: #include diagnostic.h.
	(lang_decode_option): Handle -fdiagnostics-show-location=.

2000-05-12  Nathan Sidwell  <>

	* Revert my 2000-05-08 and 2000-05-07 changes.
	* Revert my 2000-05-07 change.

2000-05-11  Jason Merrill  <>

	* class.c (check_field_decls): Complain about non-static data
	members with same name as class in class with constructor.

2000-05-10  Jason Merrill  <>

	* decl.c (grokdeclarator): Allow non-static data members with
	same name as class.

2000-05-09  Zack Weinberg  <>

	* cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
	and pending_inline.filename.  Update prototypes.
	* decl.c (define_label): Constify filename parameter.
	* decl2.c (warn_if_unknown_interface): Constify local char *.
	* input.c Constify input_source.filename. Don't declare
	input_filename or lineno.  Constify filename parameter to feed_input.
	* lex.c (init_parse): Constify parameter and return value.
	(cp_pragma_interface, cp_pragma_implementation): Constify
	filename argument.
	(reinit_parse_for_method, reinit_parse_for_block,
	reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
	Constify local char *.
	* pt.c: Don't declare lineno or input_filename.
	(print_template_context, tsubst_friend_function, tsubst_decl,
	tsubst, instantiate_decl): Constify local char *.
	* semantics.c (expand_body): Constify local char *.
	* tree.c (build_srcloc): Constify filename parameter.
	* typeck.c (c_expand_asm_operands): Constify filename

2000-05-08  Nathan Sidwell  <>

	* (__dynamic_cast): Use a reinterpret_cast. Fix
	offsetof expansion.

2000-05-08  Branko Cibej  <>

	* inc/cxxabi.h:  Fix typos in comment.
	(__base_class_info::__offset): Use a static_cast.

2000-05-07  Nathan Sidwell  <>

	* inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
	of std::size_t and std::ptrdiff_t respectively.
	* Likewise.
	* Likewise.

2000-05-06  Richard Henderson  <>

	* typeck.c (build_c_cast): Don't warn integer->pointer size
	mismatch for constants.

2000-05-06  Nathan Sidwell  <>

	* rtti.c (ptmd_initializer): Set non-public, if class is

	* inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
	(__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
	__cxa_vec_delete): Likewise.
	* (__dynamic_cast): Likewise.
	* (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
	__cxa_vec_delete): Likewise.

2000-05-04  Mark Mitchell  <>

	* cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
	(lang_decl_flags): Add vcall_offset.
	* decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
	* method.c (make_thunk): Create the lang_decl here, not in
	(emit_thunk): Make generic thunks into ordinary functions once
	they have been fed to expand_body.
	* semantics.c (expand_body): Set current_function_is_thunk here.

2000-05-04  Kaveh R. Ghazi  <>

	* class.c (update_vtable_entry_for_fn): Prototype.

	* pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
	and `tmpl'.

	* search.c (dfs_build_inheritance_graph_order): Prototype.

2000-05-04  Mark Mitchell  <>

	* cp-tree.h (special_function_kind): Add various kinds of
	(special_function_p): New function.
	* class.c (overrides): Don't let one kind of destructor override
	* decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
	whether or not to instantiate a template.
	* tree.c (special_function_p): Define.

2000-05-03  Mark Mitchell  <>

	* cp-tree.def (THUNK_DECL): Remove.
	* cp-tree.h (DECL_THUNK_P): New macro.
	(SET_DECL_THUNK_P): Likewise.
	* decl.c (decls_match): Use DECL_EXTERN_C_P.
	(duplicate_decls): Likewise.
	(pushdecl): Likewise.  Adjust thunk handling.
	(grokfndecl): Use DECL_EXTERN_C_P.
	* decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
	* dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
	* except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
	* expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
	* method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
	(emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
	* search.c (covariant_return_p): Remove THUNK_DECL handling.
	* ir.texi: Update.

2000-05-01  Jason Merrill  <>

	* tree.c (walk_tree): Set lineno.

2000-05-01  Mark Mitchell  <>

	* Update license notice.
	* Likewise.
	* Likewise.
	* Likewise.
	* Likewise.
	* Likewise.
	* Likewise.
	* inc/cxxabi.h: Likewise.
	* inc/exception: Likewise.
	* inc/new: Likewise.
	* inc/new.h: Likewise.
	* inc/typeinfo: Likewise.

2000-05-01  Jason Merrill  <>

	* tree.c (build_target_expr_with_type): If we already have a
	TARGET_EXPR, just return it.

	* optimize.c (initialize_inlined_parameters): Don't generate an
	EXPR_STMT if we can just use DECL_INITIAL.
	* decl.c (emit_local_var): Only make the initialization a
	full-expression if stmts_are_full_exprs_p.

2000-05-01  Mark Mitchell  <>

	* cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
	* call.c (standard_conversion): Use it.
	(direct_reference_binding): Likewise.
	(build_over_call): Likewise.
	(is_properly_derived_from): Likewise.
	(compare_ics): Likewise.
	* class.c (resolves_to_fixed_type_p): Likewise.
	* optimize.c (declare_return_variable): Likewise.
	* pt.c (is_specialization_of): Likewise.
	(unify): Likewise.
	* typeck.c (comp_target_parms): Likeiwse.
	(build_static_cast): Likewise.
	(build_reinterpret_cast): Likewise.
	(build_const_cast): Likewise.
	(comp_ptr_ttypes_real): Likewise.
	(comp_ptr_ttypes_const): Likewise.
	* typeck2.c (process_init_constructor): Likewise.

2000-04-30  Scott Snyder <>

	* decl.c (finish_destructor_body): Use the base destructor when
	destroying virtual bases.

2000-04-30  Mark Mitchell  <>

	* expr.c (cplus_expand_expr): Preserve temporaries when expanding
	* optimize.c (struct inline_data): Add target_exprs field.
	(declare_return_variable): When a function returns an aggregate,
	use the variable declared in the TARGET_EXPR as the remapped
	(expand_call_inline): Update the pending target_exprs stack.
	(optimize_function): Initialize the stack.

	* decl2.c (finish_file): Fix typo in comment.

	* method.c (emit_thunk): Don't try to return a `void' value.

	* optimize.c (initialize_inlined_parameters): If the parameter is
	addressable, we need to make a new VAR_DECL, even if the
	initializer is constant.

2000-04-28  Cosmin Truta  <>

	* decl.c (grok_op_properties): Add an extra check of argtypes.

2000-04-27  Mark Mitchell  <>

	* optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
	(initialize_inlined_parameters): Try to avoid creating new

2000-04-27  Alex Samuel  <>

	* lex.c (my_get_run_time): Remove.
	(init_filename_times): Use get_run_time instead of my_get_run_time.
	(check_newline): Likewise.
	(dump_time_statistics): Likewise.
	* decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
	of computing elapsed time explicitly.

2000-04-26  Mark Mitchell  <>

	* cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
	* init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
	* call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
	before calling decl_constant_value.
	* class.c (check_bitfield_decl): Likewise.
	* cvt.c (ocp_convert): Likewise.
	(convert): Likewise.
	* decl.c (compute_array_index_type): Likewise.
	(build_enumerator): Likewise.
	* decl2.c (check_cp_case_value): Likewise.
	* pt.c (convert_nontype_argument): Likewise.
	(tsubst): Likewise.
	* typeck.c (decay_conversion): Likewise.
	(build_compound_expr): Likewise.
	(build_reinterpret_cast): Likewise.
	(build_c_cast): Likewise.
	(convert_for_assignment): Likewise.

2000-04-26  Jason Merrill  <>

	* decl.c (finish_function): Don't play games with DECL_INLINE.

2000-04-25  Gabriel Dos Reis  <>

	* ir.texi: Correct typo.

2000-04-25  Martin v. L÷wis  <>

	* decl.c (grokdeclarator): Reject VLAs as members.

2000-04-24  Gabriel Dos Reis  <>

	* call.c (standard_conversion): Accept conversion between

	* cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.

2000-04-24  Zack Weinberg  <>

	* decl2.c (finish_file): Remove double setup for accounting
	compile time.

2000-04-24  Robert Lipe <>

	* cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.

2000-04-23  Benjamin Kosnik  <>

	* (set_new_handler): Needs to be in std::.

2000-04-23  Mark Mitchell  <>

	* cp-tree.h (lang_decl): Remove pretty_function_p.
	(DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
	language-specific node.
	* decl.c (cp_make_fname_decl): Use build_decl, not
	build_lang_decl, to build the variables.
	(grokvardecl): Don't call build_lang_decl for local variables in
	(grokdeclarator): Don't call build_lang_decl for local type
	declarations in templates.
	* lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
	zero'd memory, rather than calling memset.
	* pt.c: Include hashtab.h.
	(local_specializations): New variable.
	(retrieve_local_specialization): Use it.
	(register_local_specialization): Likewise.
	(tsubst_decl): Don't assume local variables have
	(instantiate_decl): Set up local_specializations.
	* (HTAB_H): New variable.

2000-04-23  Richard Henderson  <>

	* typeck.c (c_expand_asm_operands): Restore the original
	contents of the output list.

2000-04-22  Gabriel Dos Reis <>

	* ir.texi:  Document complex number representation.

2000-04-20  Nathan Sidwell  <>

	* rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
	(target_incomplete_p): New function.
	(tinfo_base_init): Create comdat NTBS name variable.
	(ptr_initializer): Add non_public parameter. Calculate it.
	(ptmd_initializer): Likewise.
	(synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
	(create_real_tinfo_var): Add non_public parameter. Use it.
	Push proxy into global namespace.
	* inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
	New enumeration.
	* inc/typeinfo (type_info::before, type_info::operator==):
	Compare __name addresses.

	* Remove new-abi builtins comment.

2000-04-20  Jason Merrill  <>

	* typeck.c (build_x_function_call): Resolve an OFFSET_REF.

	* call.c (joust): Exit early if we get the same function, too.

	* decl2.c (key_method): Return NULL_TREE for template classes.
	(import_export_class): Don't need to check for template classes.

2000-04-18  Zack Weinberg  <>

	* lex.c: Remove references to cccp.c.

2000-04-18  Mark Mitchell  <>

	* cp-tree.h (lang_decl_flags): Remove const_memfunc and
	volatile_memfunc.  Add destructor_attr.  Adjust dummy.
	(DECL_DESTRUCTOR_P): Use destructor_attr.
	(DECL_CONST_MEMFUNC_P): Reimplement.
	* class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
	(overrides): Use DECL_DESTRUCTOR_P.
	(check_for_override): Likewise.
	* decl.c (start_function): Likewise.
	* decl2.c (grokfclassfn): Likewise.
	(check_classfn): Likewise.
	(grok_function_init): Likewise.

2000-04-17  Mark Mitchell  <>

	* decl2.c (grokfield): Issue error on illegal data member

Mon Apr 17 17:11:16 2000  Mark P Mitchell  <>

	* method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.

2000-04-16  Mark Mitchell  <>

	* class.c (build_vtable_entry): Don't build thunks for type-info

2000-04-16  Jason Merrill  <>

	* decl.c (decls_match): Allow a redeclaration of a builtin to
	specify args while the builtin did not.

2000-04-15  Mark Mitchell  <>

	* cp-tree.def (THUNK_DECL): Add to documentation.
	* cp-tree.h (flag_huge_objects): Declare.
	* class.c (modify_vtable_entry): Tidy.
	(update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
	Calculate delta appropriately for the new ABI.
	(dfs_modify_vtables): Use it.
	(modify_all_vtables): Fix thinko in code to add overriding copies
	of functions to primary vtables.
	(build_clone): Fix typo in comment.
	(clone_function_decl): Correct order of destructors in vtable.
	(build_vbase_offset_vtbl_entries): Adjust comment.
	(dfs_vcall_offset_queue_p): Remove.
	(dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
	(build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
	(build_vtable_entry): Correct check for pure virtual functions.
	Don't declare flag_huge_objects.
	* decl.c (flag_huge_objects): Remove declaration.
	* method.c (make_thunk): Tweak mangling for vcall offset thunks.
	Use int_size_in_bytes.
	(emit_thunk): Handle vcall offset thunks.

Sat Apr 15 16:00:01 2000  Richard Kenner  <>

	* decl2.c (parse_time, varconst_time): Delete declarations.
	(finish_file): Delete LINENO declaration.
	START_TIME and THIS_TIME now long.

2000-04-13  Nathan Sidwell  <>

	* class.c (build_base_field): Reformat comment.

	* inc/cxxabi.h (stddef.h): Comment inclusion.
	(__base_class_info::__offset): Comment shift.

2000-04-12  Mark Mitchell  <>

	* cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
	(cp_push_exception_identifier): New macro.
	(get_vtbl_decl_for_binfo): Fix formatting.
	(in_charge_arg_for_name): New macro.
	(maybe_build_cleanup_and_delete): Remove declaration.
	* call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
	(in_charge_arg_for_name): New function.
	(build_new_method_call): Use it.  Handle cloned destructors.
	(build_clone): Don't make the base constructor virtual.
	Automatically defer generated functions.
	(clone_function_decl): Handle destructors, too.
	(clone_constructors_and_destructors): Likewise.
	(create_vtable_ptr): Don't create a vtable entry for a cloned
	* decl.c (predefined_identifier): Add ctor_or_dtor_p.
	(initialize_predefined_identifiers): Update appropriately.
	(finish_destructor_body): Simplify.
	(maybe_build_cleanup_and_delete): Remove.
	* except.c (expand_throw): Handle new-ABI destructors.
	* init.c (expand_cleanup_for_base): Use base_dtor_identifier.
	(build_dtor_call): New function.
	(build_delete): Use it.  Simplify.
	* optimize.c (maybe_clone_body): Handle destructors.
	* search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.

	* (cleanup_fn): New typedef.
	(CALL_CLEANUP): New macro.
	(cp_eh_info): Use them.
	(__cp_push_exception): Likewise.
	(__cp_pop_exception): Likewise.

2000-04-11  Mark Mitchell  <>

	* cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
	(complete_dtor_identifier): New macro.
	(lang_decl): Add cloned_function.
	(clone_function_decl): Declare.
	(maybe_clone_body): Likewise.
	* call.c (build_user_type_conversion_1): Call complete object
	constructors in the new ABI.
	(build_new_method_call): Don't add in-charge parameters under the
	new ABI.
	* class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
	(build_clone): New function.
	(clone_function_decl): Likewise.
	(clone_constructors_and_destructors): Likewise.
	(check_bases_and_members): Use it.
	* decl.c (iniitialize_predefined_identifiers): Initialize
	(finish_function): Don't add extra code to a clone.
	(lang_mark_tree): Mark cloned_function.
	* decl2.c (mark_used): Don't bother trying to instantiate things
	we synthesized.
	* dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
	* method.c (set_mangled_name_for_decl): Don't treat clones as
	(synthesize_method): Sythesize cloned functions, not the clones.
	* optimize.c (inline_data): Update comment on ret_label.
	(remap_block): Don't assume DECL_INITIAL exists.
	(copy_body_r): Allow ret_label to be NULL.
	(maybe_clone_body): Define.
	* pt.c (tsubst_decl): Handle clones.
	(instantiate_clone): New function.
	(instantiate_template): Use it.
	(set_mangled_name_for_template_decl): Don't treat clones as
	* search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
	* semantics.c (expand_body): Clone function bodies as necessary.

	* optimize.c (remap_decl): Avoid sharing structure for arrays
	whose size is only known at run-time.
	* tree.c (copy_tree_r): Don't copy PARM_DECLs.

	* cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
	to has_in_charge_parm_p.
	* call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
	(build_user_type_conversion_1): Likewise.
	(convert_like_real): Likewise.
	(build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
	* decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
	(copy_args_p): Likewise.
	(grok_ctor_properties): Likewise.
	(start_function): Likewise.
	* decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
	* error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
	* init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
	* method.c (do_build_copy_constructor): Use
	(synthesize_method): Likewise.
	* pt.c (instantiate_template): Remove goto.
	* tree.c (build_cplus_method_type): Remove mention of obstacks in

	* cp-tre.h (finish_function): Change prototype.
	* decl.c (end_cleanup_fn): Adjust caller.
	(finish_function): Take only one parameter.
	* decl2.c (finish_objects): Adjust caller.
	(finish_static_storage_duration_function): Likewise.
	* method.c (emit_thunk): Likewise.
	* parse.y: Likewise.
	* parse.c: Regenerated.
	* pt.c (instantiate_decl): Likewise.
	* rtti.c (synthesize_tinfo_fn): Likewise.
	* semantics.c (expand_body): Likewise.

	* cp-tree.h (copy_decl): New function.
	* class.c (finish_struct_1): Use it.
	* lex.c (copy_decl): Define it.
	* pt.c (tsubst_decl): Likewise.
	* tree.c (copy_template_template_parm): Likewise.

	* cp-tree.h (lang_type): Remove has_nonpublic_ctor and
	(TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
	* class.c (finish_struct_methods): Don't set
	(interface_only): Don't declare.
	(interface_unknown): Likewise.

2000-04-11  Martin v. L÷wis  <>

	* tree.h (HAVE_TEMPLATES): Remove definition.
	* lang-options.h (-fthis-is-variable): Remove documentation.

2000-04-10  Jason Merrill  <>

	* class.c (instantiate_type): Handle object-relative template-id.

	* semantics.c (finish_expr_stmt): Call convert_to_void here.
	* decl.c (cplus_expand_expr_stmt): Not here.

	* rtti.c (build_dynamic_cast_1): Call non_lvalue.
	Initialize exprtype earlier.

	* parse.y (fn.def1): Check for defining types in return types.

	* decl.c (check_tag_decl): Notice extra fundamental types.
	Diagnose empty decls in classes, too.

	* decl.c (grokdeclarator): Don't override an anonymous name if no
	declarator was given.

	* cvt.c (convert_to_void): Call resolve_offset_ref.

	* typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.

	* decl2.c (decl_namespace): Handle getting a type.

	* typeck.c (build_c_cast): Re-enable warning for cast between
	pointer and integer of different size.

2000-04-10  Nathan Sidwell  <>

	* inc/cxxabi.h (__pointer_type_info): Add restrict and
	incomplete flags.
	(__pointer_type_info::__pointer_catch): New virtual function.
	(__pointer_to_member_type_info): Derive from
	__pointer_type_info. Adjust.
	(__pointer_to_member_type_info::__do_catch): Remove.
	(__pointer_to_member_type_info::__is_pointer_p): Declare.
	(__pointer_to_member_type_info::__pointer_catch): Declare.
	* rtti.c (qualifier_flags): Add restrict flag.
	(ptmd_initializer): Reorder members.
	(create_tinfo_types): Expand comments. Reorder
	ptmd_desc_type_node members.
	* (__pointer_to_member_type_info::__is_pointer_p):
	(__pointer_type_info::__do_catch): Move specific code into
	__pointer_catch. Call it.
	(__pointer_type_info::__pointer_catch): Non-pointer-to-member
	specific catch checking. Fix void conversion check.
	(__pointer_to_member_type_info::__do_catch): Remove.
	(__pointer_to_member_type_info::__pointer_catch): Implement.

2000-04-10  Martin v. L÷wis  <>

	* lex.c (init_parse): Remove traces of classof and headof.
	* decl2.c (flag_operator_names): Default to 1.
	(lang_decode_option): Do not set it for -ansi.

2000-04-09  Mark Mitchell  <>

	* cp-tree.h (struct lang_decl): Remove main_decl_variant.
	* decl.c (duplicate_decls): Don't set it.
	(start_function): Likewise.
	(lang_mark_tree): Don't mark it.
	* decl2.c (defer_fn): Don't use it.
	* lex.c (retrofit_lang_decl): Don't set it.
	* pt.c (tsubst_decl): Likewise.
	* ptree.c (print_lang_decl): Don't print it.
	* typeck.c (mark_addressable): Don't use it.

2000-04-09  Nathan Sidwell  <>

	* Include <new> and <exception>.
	(__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
	(__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
	(__cxa_vec_delete): Catch dtor exceptions.

2000-04-09  Nathan Sidwell  <>

	Prepend __ to implementation defined names.
	* inc/typeinfo (type_info): Rename _name to __name.
	(type_info::type_info): Rename parameter.
	(type_info::operator==, type_info::operator!=,
	type_info::before): Likewise.
	(type_info::is_pointer_p, type_info::is_function_p,
	type_info::do_catch, type_info::do_upcast): Prepend __. Rename
	* inc/cxxabi.h
	(__fundamental_type_info::__fundamental_type_info) Rename parameters.
	(__pointer_type_info::__pointer_type_info): Likewise.
	__pointer_type_info::do_catch): Prepend __. Rename parameters.
	(__array_type_info::__array_type_info): Rename parameters.
	(__function_type_info::__function_type_info): Likewise.
	(__function_type_info::is_function_p): Prepend __.
	(__enum_type_info::__enum_type_info): Rename parameters.
	(__pointer_to_member_type_info::do_catch): Prepend __. Rename
	(__base_class_info::is_virtual_p, is_public_p, offset): Prepend	__.
	(__class_type_info::__class_type_info): Rename parameters.
	(__class_type_info::sub_kind): Prepend __. Adjust member names.
	__class_type_info::dyncast_result): Prepend __. Move definition
	(__class_type_info::do_upcast, __class_type_info::do_catch,
	__class_type_info::do_find_public_src): Pr