view gcc/cp/ChangeLog-2002 @ 16:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
line wrap: on
line source

2002-12-31  Neil Booth  <>

	* .cvsignore: Remove.

2002-12-31  Steven Bosscher  <>

	* call.c, class.c, cp-lang.c, cp-tree.h, cvt.c, dump.c, error.c,
	  except.c, expr.c friend.c, g++spec.c, init.c, lang-options.h,
	  lang-specs.h, lex.c, mangle.c, method.c, optimize.c, parser.c,
	  pt.c, ptree.c, repo.c, rtti.c, search.c, semantics.c, tree.c,
	  typeck.c, typeck2.c: Replace "GNU CC" with "GCC" in the
	  copyright header.
	* lex.h: parse.y is dead, so don't mention it.  Also replace the
	  copyright header with the default GNU copyright header.

2002-12-31  Mark Mitchell  <>

	* cp-tree.h (LOOKUP_TEMPLATES_EXPECTED): Remove.
	(lookup_name_namespace_only): Likewise.
	(begin_only_namespace_names): Likewise.
	(end_only_namespace_names): Likewise.
	* decl.c (only_namespace_names): Remove.
	(qualify_lookup): Do not check LOOKUP_TEMPLATES_EXPECTED.
	(lookup_name_real): Do not check only_namespace_names.
	(lookup_name_namespace_only): Remove.
	(begin_only_namespace_names): Likewise.
	(end_only_namespace_names): Likewise.
	* parser.c (cp_parser_nested_name_specifier_opt): Handle erroneous
	nested-name-specifiers more gracefully.
	(cp_parser_class_or_namespace_name): Avoid looking up namespace
	names when they cannot possibly appear.
	(cp_parser_template_name): Adjust call to cp_parser_lookup_name.
	(cp_parser_elaborated_type_specifier): Likewise.
	(cp_parser_namespace_name): Only look for namespace names.
	(cp_parser_lookup_name): Add is_namespace parameter.
	(cp_parser_lookup_name_simple): Adjust call to

	* parser.c (cp_parser_dependent_type_p): Fix thinko.

2002-12-31  Neil Booth  <>

	* .cvsignore: Update.

2002-12-31  Nathan Sidwell  <>

	* class.c (modify_vtable_entry): Remove unused variable.
	(get_vcall_index): Always expect a non-thunk.
	(update_vtable_entry_for_fn): Combine covariant adjustments, when
	overriding a thunk. Pass get_vcall_index a non-thunk.

	* decl2.c (finish_file): Mark undefined inlines as extern.

2002-12-31  Mark Mitchell  <>

	* cp-tree.def (RETURN_INIT): Remove.
	* cp-tree.h (DECL_IN_MEMORY_P): Remove.
	(scope_kind): Add sk_block, sk_try, sk_catch, sk_for.
	(note_level_for_for): Remove.
	(note_level_for_try): Likewise.
	(note_level_for_catch): Likewise.
	(finish_named_return_value): Likewise.
	(do_pushlevel): Change prototype.
	(pending_lang_change): Remove.
	* decl.c (begin_scope): Handle sk_block, sk_try, sk_catch,
	(note_level_for_for): Remove.
	(note_level_for_try): Likewise.
	(note_level_for_catch): Likewise.
	(maybe_inject_for_scope_var): Remove use of DECL_IN_MEMORY_P.
	* parser.c (cp_parser_context_free_list): Make it "deletable".
	(cp_parser_template_argument): Remove misleading comment.
	* pt.c (tsubst_expr): Remove RETURN_INIT code.
	* semantics.c (genrtl_named_return_value): Remove.
	(do_pushlevel): Take a scope kind as an argument.
	(begin_if_stmt): Adjust.
	(begin_while_stmt): Likewise.
	(begin_for_stmt): Likewise.
	(finish_for_init_stmt): Likewise.
	(begin_switch_stmt): Likewise.
	(begin_handler): Likewise.
	(begin_compound_stmt): Likewise.
	(finish_named_return_value): Remove.
	(cp_expand_stmt): Remove RETURN_INIT case.
	* tree.c (cp_statement_code_p): Remove RETURN_INIT case.

2002-12-31  Mark Mitchell  <>

	PR c++/9112
	* parser.c (cp_parser_direct_declarator): Handle erroneous
	parenthesized declarators correctly.

2002-12-31  Gabriel Dos Reis  <>

	* cp-tree.h (pending_lang_change): Declare.

2002-12-30  Mark Mitchell  <>

	* parser.c (cp_parser_context_free_list): New variable.
	(cp_parser_context_new): Use it.
	(cp_parser_error): Check return code from
	(cp_parser_simulate_error): Return a value.
	(cp_parser_id_expression): Optimize common case.
	(cp_parser_class_name): Likewise.
	(cp_parser_class_specifier): Adjust call to
	(cp_parser_lookup_name): Optimize common case.
	(cp_parser_late_parsing_for_member): Adjust call to
	(cp_parser_late_parsing_default_args): Add scope parameter.
	(cp_parser_require): Avoid creating the error message unless it's
	(cp_parser_parse_definitely): Place free'd contexts on the free

	* parser.c (cp_parser_declaration_seq_opt): Handle pending_lang_change.

2002-12-30  David Edelsohn  <>

	* parser.c (cp_parser_parameter_declaration_clause): Treat system
	header as extern "C" if NO_IMPLICIT_EXTERN_C undefined.

2002-12-30  Nathanael Nerode  <>

	*,, operators.def, cp-tree.def:
	GCC, not GNU CC.

2002-12-30  Mark Mitchell  <>

	* parse.y: Remove.
	* spew.c: Likewise.
	* (gt-cp-spew.h): Remove.
	* cp-tree.h (do_pending_lang_change): Remove.
	(do_identifier): Change prototype.
	(finish_id_expr): Remove.
	* decl.c (lookup_name_real): Remove yylex variable.
	* decl2.c (build_expr_from_tree): Adjust call to do_identifier.
	* lex.c (init_cpp_parse): Remove.
	(reduce_cmp): Likewise.
	(token_cmp): Likewise.
	(yychar): Likewise.
	(lastiddecl): Likewise.
	(token_count): Likewise.
	(reduce_count): Likewise.
	(yyhook): Likewise.
	(print_parse_statistics): Likewise.
	(do_pending_lang_change): Likewise.
	(do_identifier): Remove parsing parameter.
	* lex.h (lastiddecl): Remove.
	(looking_for_typename): Remove.
	(looking_for_template): Likewise.
	(pending_lang_change): Likewise.
	(yylex): Likewise.
	* semantics.c (finish_id_expr): Remove.

	* decl.c (grokdeclarator): Diagnost "extern thread" and "static
	thread" correctly.

2002-12-30  Nathanael Nerode  <>

	* decl.c, decl2.c, decl.h:  GCC, not GNU CC.  This is the C++ front
	end, not the C front end.

2002-12-30  Nathan Sidwell  <>

	* cp-tree.h (THUNK_TARGET): New macro.
	(THUNK_VIRTUAL_OFFSET): For result thunks it is always a binfo.
	(finish_thunk): Remove offset parms.
	* class.c (find_final_overrider): Look through thunks.
	(get_vcall_index): Use THUNK_TARGET.
	(update_vtable_entry_for_fn): Look through thunks. Set covariant
	fixed offset here. Adjust finish_thunk call.
	(build_vtbl_initializer): Adjust finish_thunk calls.
	* mangle.c (mangle_call_offset): Remove superfluous if.
	(mangle_thunk): Adjust.
	* method.c (make_thunk): Adjust.
	(finish_thunk): Adjust.
	(thunk_adjust): Remove assert.
	(use_thunk): Use THUNK_TARGET
	* dump1.c (cp_dump_tree): Adjust thunk dumping.

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

2002-12-28  Gabriel Dos Reis  <>

	Remove traditional C constructs 4/n.
	* decl2.c (grok_method_quals, warn_if_unknown_interface,
	grok_x_components, cp_build_parm_decl, build_artificial_parm,
	maybe_retrofit_in_chrg, grokclassfn, grok_array_decl,
	delete_sanity, check_member_template, check_java_method,
	check_classfn, finish_static_data_member_decl, grokfield,
	grokbitfield, grokoptypename, grok_function_init,
	cplus_decl_attributes, constructor_name, defer_fn,
	build_anon_union_vars, finish_anon_union, coerce_new_type,
	coerce_delete_type, comdat_linkage, maybe_make_one_only,
	key_method, import_export_vtable, import_export_class,
	output_vtable_inherit, import_export_decl, import_export_tinfo,
	build_cleanup, get_guard, get_guard_bits, get_guard_cond,
	set_guard, start_objects, finish_objects,
	finish_static_storage_duration_function, get_priority_info,
	do_static_initialization, do_static_destruction,
	prune_vars_needing_no_initialization, write_out_vars,
	reparse_decl_as_expr, finish_decl_parsing, namespace_ancestor,
	add_using_namespace, merge_functions, ambiguous_decl,
	lookup_using_namespace, lookup_using_namespace,
	qualified_lookup_using_namespace, set_decl_namespace,
	decl_namespace, current_decl_namespace, push_decl_namespace,
	pop_decl_namespace, push_scope, pop_scope, add_function,
	arg_assoc_namespace, arg_assoc_template_arg, arg_assoc,
	lookup_arg_dependent, do_namespace_alias,
	validate_nonmember_using_decl, do_nonmember_using_decl,
	do_toplevel_using_decl, do_local_using_decl,
	do_class_using_decl, do_using_directive, check_default_args,
	mark_used, handle_class_head): Use C90 prototypings.  Use booleans.
	* parser.c (cp_parser_class_head): Use booleanss.
	* decl.c (walk_globals, walk_vtables): Likewise.
	* cp-tree.h (walk_globals_pred, walk_globals_fn, walk_vtables,
	walk_globals): Change return type from 'int' to 'bool'.
	* rtti.c (init_rtti_processing, build_headof, throw_bad_cast
	throw_bad_typeid, get_tinfo_decl_dynamic, typeid_ok_p,
	build_typeid, tinfo_name, get_tinfo_decl, get_tinfo_ptr,
	get_typeid, ifnonnull, build_dynamic_cast_1, build_dynamic_cast,
	qualifier_flags, tinfo_base_init, generic_initializer,
	ptr_initializer, dfs_class_hint_mark, ptm_initializer,
	dfs_class_hint_unmark, class_hint_flags, class_initializer,
	typeinfo_in_lib_p, get_pseudo_ti_init, create_pseudo_type_info,
	get_pseudo_ti_desc, create_tinfo_types, emit_support_tinfos,
	unemitted_tinfo_decl_p, emit_tinfo_decl): Likewise.
	* repo.c (repo_compile_flags, repo_template_declared,
	repo_template_defined, repo_class_defined, repo_get_id,
	repo_template_used, repo_vtable_used, repo_inline_used,
	repo_tinfo_used, repo_template_instantiated, extract_string,
	open_repo_file, afgets, init_repo, reopen_repo_file_for_write,
	finish_repo): Likewise.
	* ptree.c (cxx_print_decl, cxx_print_type, cxx_print_identifier,
	cxx_print_xnode): Likewise..
	* cp-lang.c (ok_to_generate_alias_set_for_type, cxx_get_alias_set,
	cxx_warn_unused_global_decl, cp_expr_size): Likewise.
	* cxxfilt.c (demangle_it, print_demangler_list, usage,
	standard_symbol_characters, hp_symbol_characters, main, fatal):
	(strip_underscore):  Change type from 'int' to 'bool'.
	(main): Use boolean constants.

2002-12-28  Gabriel Dos Reis  <>

	Remove traditional C constructs 3/n.
	* cvt.c (cp_convert_to_pointer, convert_to_pointer_force,
	build_up_reference, warn_ref_binding, convert_to_reference,
	convert_from_reference, convert_lvalue, cp_convert, ocp_convert,
	convert_to_void, convert, convert_force, build_type_conversion,
	build_expr_type_conversion, type_promotes_to,
	perform_qualification_conversions): Use C90 prototyping style.
	* decl2.c (grok_array_decl): Use boolean constant.
	(delete_sanity): Likewise.
	* typeck.c (build_unary_op): Likewise.
	* semantics.c (finish_switch_cond): Likewise.
	* parser.c (cp_parser_direct_new_declarator): Likewise.
	* init.c (build_new): Likewise.

2002-12-27  Mark Mitchell  <>

	* (po-generated): Remove parse.c.
	(CXX_OBJS): Remove parse.o and spew.o.  Add parser.o.
	($(srcdir)/cp/parse.h): Remove target.
	($(srcdir)/cp/parse.c): Likewise.
	(gt-cp-parse.h): Likewise.
	(gt-cp-parser.h): New target.
	(c++.distclean): Do not remove parse.output.
	(c++.maintainer-clean): Do not remove parse.c or parse.h.
	(cp/spew.o): Remove target.
	(cp/lex.o): Adjust dependencies.
	(cp/pt.o): Likewise.
	(cp/parse.o): Likewise.
	(cp/TAGS): Do not mention parse.c.
	(cp/parser.o): New target.
	* NEWS: Mention the new parser.
	* call.c (build_scoped_method_call): Simplify.
	(build_method_call): Likewise.
	(build_new_function_call): Adjust calls to add_function_candidate
	and add_template_candidate.
	(build_new_op): Improve handling of erroroneous operands.
	(convert_default_arg): Remove circular argument processing.
	(name_as_c_string): New function.
	(build_new_method_call): Use it.
	(perform_implicit_conversion): Use error_operand_p.
	* class.c (finish_struct_anon): Use constructor_name_p.
	(check_field_decls): Likewise.
	(pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
	(resolve_address_of_overloaded_function): Likewise.
	(instantiate_type): Tweak pointer-to-member handling.
	(get_primary_binfo): Remove incorrect assertion.
	* (gtfiles): Add parser.c, remove parse.c.
	* cp-tree.h (DEFARG_TOKENS): New macro.
	(default_arg): New structure.
	(cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
	(lang_tree_node): Add default_arg.
	(cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
	(type_info_ref_type): New macro.
	(saved_scope): Make processing_explicit_instantiation a boolean.
	(check_access): New field.
	(unparsed_text): Remove.
	(language_function): Remove unparsed_inlines.
	(error_operand_p): New macro.
	(lang_decl): Adjust pending_inline_info.
	(tag_types): Add typenames.
	(lookup_ualified_name): Declare.
	(lookup_name_real): Likewise.
	(shadow_tag): Adjust prototype.
	(get_scope_of_declarator): Declare it.
	(process_next_inline): Remove it.
	(check_for_missing_semicolon): Likewise.
	(maybe_get_template_decl_from_type_decl): Declare it.
	(finish_label_stmt): Adjust prototype.
	(finish_non_static_data_meber): Declare it.
	(finish_pseudo_destructor_call_expr): Rename to ...
	(finish_pseudo_destructor_expr): ... this.
	(finish_compound_literal): Declare it.
	(begin_inline_definitions): Remove it.
	(init_spew): Remove.
	(peekyylex): Likewise.
	(arbitrate_lookup): Likewise.
	(frob_opname): Likewise.
	(maybe_snarf_defarg): Likewise.
	(add_defarg_fn): Likewise.
	(do_pending_defargs): Likewise.
	(done_pending_defargs): Likewise.
	(unprocessed_defarg_fn): Likewise.
	(replace_defarg): Likewise.
	(end_input): Likewise.
	(get_overloaded_fn): Likewise.
	* cvt.c (convert_to_reference): Improve error handling.
	* decl.c (lookup_name_real): Do not declare it static.
	(maybe_push_to_top_level): Set check_access.
	(identifier_type_value): Adjust call to lookup_name_real.
	(lookup_qualified_name): New method.
	(lookup_name_real): Remove special-case parsing code.
	(lookup_name-nonclass): Adjust call to lookup_name_real.
	(lookup_name_namespace_only): Likewise.
	(lookup_name): Likewise.
	(check_tag_decl): Return the type declared.
	(shadow_tag): Likewise.
	(register_dtor_fn): Tweak check_access.
	(grokfndecl): Use constructor_name_p.
	(get_scope_of_declarator): New function.
	(grokdeclarator): Obscure tweaks for slightly different declarator
	(start_method): Return error_mark_node to indicate failure.
	(cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
	* decl2.c (constructor_name_full): Simplify.
	(constructor_name): Use it.
	(build_expr_from_tree): Adjust for changes to do new parser.
	(push_scope): Improve robustness.
	(validate_nonmember_using_decl): Process declarations, not names.
	(do_class_using_decl): Likewise.
	(handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
	* error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
	* expr.c (cxx_expand_expr): Handle BASELINKs.
	* init.c (member_init_ok_or_else): Issue more errors.
	(build_offset_ref): Tweak handling of FUNCTION_DECLs.
	* lex.c: Do not include parse.h.
	(yypring): Do not declare.
	(yylval): Likewise.
	(make_reference_declarator): Remove error-generating code.
	(rid_to_yy): Remove.
	(cxx_init): Do not call init_spew.
	(yypring): Remove.
	(check_for_missing_semicolon): Remove.
	* lex.h (got_scope): Remove.
	(got_object): Remove.
	* method.c (hack_identifier): Use finish_non_static_data_member.
	(implicitly_declare_fn): Adjust use of constructor_name.
	* parser.c: New file.
	* pt.c (parse.h): Do not include it.
	(maybe_get_template_decl_from_template): Do not declare it.
	(finish_member_template_decl): Tweak.
	(begin_explicit_instantiation): Adjust for
	processing_explicit_instantiation being boolean.
	(end_explicit_instantiation): Likewise.
	(maybe_process_partial_specialization): Tighten specialization
	(retrieve_local_specialization): Adjust ue of hash table.
	(eq_local_specializations): New function.
	(register_local_specialization): Likewise.
	(push_template_decl_real): Remove unnecessary test.
	(maybe_get_template_decl_from_type_decl): Don't make it static.
	(for_each_template_parm_r): Handle TYPEOF_TYPE.
	(tsubst_copy): Use retrieive_local_specialization to handle
	PARM_DECL.  Adjust handling of CONST_DECLs.  Handle BASELINKs.
	Handle COMPONENT_REFs with pseudo-destructor-expressions.
	Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
	(tsubst_expr): Pass decls, not names, to do_local_using_decl.
	(unify): Tweak handling of CONST_DECLs.
	(regenerate_decl_from_template): Use push_nested_class.
	(template_for_substitution): New funciton.
	(instantiate_decl): Use it.  Register parameters as local
	* rtti.c (init_rtti_processing): Set type_info_ref_type.
	(build_typeid): Use it.
	(get_typeid): Likeise.
	* search.c (accessible_p): Use check_access, not
	(adjust_result_of_qualified_name_lookup): Pay attention to the
	* semantics.c (finish_asm_stmt): Adjust error handling.
	(finish_label_stmt): Return the statement.
	(finish_non_static_data_member): New function.
	(finish_class_expr): Handle BASELINKs.
	(finish_call_expr): Handle PSEUDO_DTOR_EXPR.
	(finish_object_call_expr): Simplify handling during templates.
	(finish_pseudo_destructor_call_expr): Rename to ...
	(finish_pseudo_dtor_expr): ... this.
	(finish_compound_literal): New function.
	(begin_inline_definitions): Remove.
	(finish_sizeof): Remove special template handling.
	* spew.c: Do not include parse.h.
	* tree.c (get_overloaded_fn): Remove.
	* typeck.c (build_class_member_access_expr): Handle
	PSEUDO_DTOR_EXPR.  Adjust handling of static member functions.
	(lookup_destructor): New function.
	(finish_class_member_access_expr): Use it.
	(convert_arguments): Simplify.
	(build_unary_op): Handle BASELINKs.

2002-12-26  Nathan Sidwell  <>

	PR c++/4803
	* decl2.c (mark_used): Defer inline functions.
	(finish_file): Merge deferred_fns loops. Check all used
	inline functions have a definition.
	* method.c (make_thunk): Thunks are not inline.

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

2002-12-24  Nathan Sidwell  <>

	PR C++/7964
	* cp-tree.h (resolve_scoped_fn_name): Prototype.
	* call.c (resolve_scoped_fn_name): New function. Deal with
	more template expansion. Broken out of ...
	* parse.y (parse_finish_call_expr): ... here. Call it.
	* decl2.c (build_expr_from_tree, CALL_EXPR): Use
	resolve_scoped_fn_name and build_call_from_tree.

	PR c++/9053
	* decl.c (duplicate_decls): Templates may be disambiguated by
	return type.

	PR c++/8702
	* decl2.c (check_classfn): Use lookup_fnfield_1. List all
	conversion operators on failure.

2002-12-23  Gabriel Dos Reis  <>

	Remove traditional C constructs 2/n.
	* call.c (tourney, build_field_call, equal_functions, joust,
	compare_ics, build_over_call, build_java_interface_fn_ref,
	convert_like_real, op_error, build_object_call, resolve_args,
	build_vfield_ref, check_dtor_name, build_scoped_method_call,
	build_addr_func, build_call, build_method_call, null_ptr_cst_p,
	sufficient_parms_p, build_conv, non_reference, strip_top_quals,
	standard_conversion, reference_related_p,
	reference_compatible_p, convert_class_to_reference,
	direct_reference_binding, reference_binding,
	,implicit_conversion, is_complete, promoted_arithmetic_type_p,
	add_template_conv_candidate, any_viable, any_strictly_viable,
	build_this, splice_viable, print_z_candidates,
	build_user_type_conversion, build_new_function_call,
	conditional_conversion, build_conditional_expr, build_new_op,
	build_op_delete_call, enforce_access, call_builtin_trap,
	convert_arg_to_ellipsis, build_x_va_arg, cxx_type_promotes_to,
	convert_default_arg, type_passed_as, convert_for_arg_passing,
	in_charge_arg_for_name, is_properly_derived_from,
	maybe_handle_implicit_object, maybe_handle_ref_bind,
	source_type, add_warning, can_convert, can_convert_arg,
	perform_implicit_conversion, can_convert_arg_bad,
	initialize_reference, add_conv_candidate,
	add_template_candidate_real, add_template_candidate): Ansify.

2002-12-22  Nathan Sidwell  <>

	PR c++/8572
	* cp-tree.h (grokoptypename): Add SCOPE parameter.
	* decl2.c (grokoptypename): Add SCOPE parameter. tsubst the type
	if in a template scope.
	* parse.y (unoperator): Return the scope.
	(operator_name): Adjust grokoptypename call.

2002-12-22  Kriang Lerdsuwanakij  <>

	* cp-tree.h (make_unbound_class_template): Use tsubst_flags_t.
	* decl.c (make_unbound_class_template): Adjust.  Check for tf_error.
	* pt.c (tsubst) [OFFSET_TYPE]: Check for tf_error.

2002-12-20  Kazu Hirata  <>

	* ChangeLog: Fix a typo.
	* class.c: Fix comment typos.
	* cp-tree.h: Likewise.

2002-12-18  Jason Merrill  <>

	Handle anonymous unions at the tree level.
	C++ ABI change: Mangle anonymous unions using the name of their
	first named field (by depth-first search).  Should not cause
	binary compatibility problems, though, as the compiler previously
	didn't emit anything for affected unions.
	* cp-tree.def (ALIAS_DECL): New tree code.
	* decl2.c (build_anon_union_vars): Build ALIAS_DECLs.  Return the
	first field, not the largest.
	(finish_anon_union): Don't mess with RTL.  Do set DECL_ASSEMBLER_NAME,
	push the decl, and write it out at namespace scope.
	* decl.c (lookup_name_real): See through an ALIAS_DECL.
	(pushdecl): Add namespace bindings for ALIAS_DECLs.
	* rtti.c (unemitted_tinfo_decl_p): Don't try to look at the name
	of a decl which doesn't have one.
	* typeck.c (build_class_member_access_expr): Don't recurse if
	we already have the type we want.

2002-12-18  Kriang Lerdsuwanakij  <>

	PR c++/8099
	* friend.c (make_friend_class): Allow partial specialization
	when declaration is not a template friend.

2002-12-18  Kriang Lerdsuwanakij  <>

	PR c++/3663
	* pt.c (lookup_template_class): Copy TREE_PRIVATE and
	TREE_PROTECTED to created decl nodes.

2002-12-18  Mark Mitchell  <>

	* class.c (build_base_field): Do not set DECL_PACKED on the

2002-12-18  Gabriel Dos Reis  <>

	* cp-tree.h (struct tree_srcloc): Use location_t.

2002-12-17  Jason Merrill  <>

	* decl.c (finish_function): Also complain about no return in
	* semantics.c (finish_return_stmt): Also call check_return_expr in
	* typeck.c (check_return_expr): In a template, just remember that we
	saw a return.

2002-12-16  Jason Merrill  <>

	* semantics.c (simplify_aggr_init_exprs_r): Don't change the type
	of the CALL_EXPR.

	* semantics.c (do_pushlevel): Call pushlevel after adding the
	(do_poplevel): Call poplevel before adding the SCOPE_STMT.
	* parse.y (function_body): Go back to using compstmt.
	* decl.c (pushdecl): Skip another level to get to the parms level.

	* call.c (build_new_method_call): Use is_dummy_object to determine
	whether or not to evaluate the object parameter to a static member

2002-12-14  Jason Merrill  <>

	* semantics.c (simplify_aggr_init_exprs_r): Also prepend the
	return slot for normal functions.  Set CALL_EXPR_HAS_RETURN_SLOT_ADDR.
	* tree.c (build_cplus_new): If the type isn't TREE_ADDRESSABLE,
	don't bother with an AGGR_INIT_EXPR.
	(cp_copy_res_decl_for_inlining): If the type isn't TREE_ADDRESSABLE,
	just generate a new decl normally.  Take return slot parm.
	* cp-tree.h: Adjust prototype.

2002-12-13  Gabriel Dos Reis  <>

	PR C++/8031
	* cvt.c (convert_to_pointer_force): Don't try comparing against
	erronous type.

2002-12-13  Geoffrey Keating  <>

	* cp-tree.h: Have the multiple-include guards around
	the entire file.

2002-12-10  David Edelsohn  <>

	* cp/spew.c (feed_input): Change limit to last_pos and pos to cur_pos
	(snarf_method): Same.
	(snarf_defarg): Same.

2002-12-10  Mark Mitchell  <>

	PR c++/8372
	* pt.c (tsubst_copy): Handle destructor names more correctly.

2002-12-10  Matt Austern   <>

	* cp-tree.h: get rid of needs_virtual_reinit bit.

2002-12-09  Mark Mitchell  <>

	* NEWS: Document removal of in-class initialization extension for
	static data members of non-arithmetic, non-enumeration type.
	* decl.c (check_static_variable_definition): Do not allow that
	* 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  Nathan Sidwell  <>

	Implement covariant returns.
	* cp-tree.h (IS_AGGR_TYPE_2): Remove.
	(struct lang_decl_flags): Add this_thunk_p flag.
	Rename vcall_offset to virtual_offset.
	(struct lang_decl): Rename delta to fixed_offset.
	(make_thunk): Add this_adjusting arg.
	(finish_thunk): Declare.
	(mangle_thunk): Add this_adjusting arg.
	* class.c (get_vcall_index): Use base function for lookup.
	(update_vtable_entry_for_fn): Generate covariant thunk.
	(finish_struct_1): Set DECL_VINDEX to NULL for thunks.
	(build_vtbl_initializer): Use base function for lookup.
	Finish covariant thunk here. Adjust thunk generation.
	* dump.c (cp_dump_tree): Simplify DECL_GLOBAL_[CD]TOR_P handling.
	Adjust thunk dumping.
	* mangle.c (mangle_call_offset): New function.
	(mangle_thunk): Adjust for covariant thunks.
	* method.c (make_thunk): Adjust. Do not set name here.
	(finish_thunk): New function. Set name here.
	(use_thunk): Generate covariant thunks too.
	(thunk_adjust): New function.
	* search.c (covariant_return_p): Remove. Fold into ...
	(check_final_overrider): ... here. Simplify.
	* semantics.c (emit_associated_thunks): Walk covariant thunk lists.

2002-12-03  Jason Merrill  <>

	PR c++/8674
	* call.c (build_over_call): Check specifically for TARGET_EXPR
	when eliding.

	PR c++/8461, c++/8625
	* call.c (convert_for_arg_passing): Don't mess with error_mark_node.
	(cp_convert_parm_for_inlining): Remove.
	* cp-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  Zack Weinberg  <>

	* call.c, class.c, cp-lang.c, cvt.c, cxxfilt.c, decl.c, decl2.c,
	dump.c, error.c, except.c, expr.c, friend.c, g++spec.c, init.c,
	lex.c, mangle.c, method.c, optimize.c, parse.y, pt.c, ptree.c,
	repo.c, rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
	typeck2.c: Include coretypes.h and tm.h.
	* Update dependencies.

2002-11-30  Mark Mitchell  <>

	PR c++/8227
	* decl.c (layout_var_decl): Deal gracefully with erroneous types.
	(check_initializer): Validate the type of the initialized
	variable, even if the initializer is absent.
	* typeck.c (cp_type_quals): Deal gracefully with erroneous types.

	PR c++/8214
	* typeck.c (convert_for_assignment): Do not use
	decl_constant_value on the operand.

	PR c++/8511
	* pt.c (instantiate_decl): Handle template friends defined outside
	of the class correctly.

2002-11-29  Joe Buck <>

	* parse.y (class_head_defn): Set CLASSTYPE_DECLARED_CLASS for
	anonymous structs.

2002-11-29  Mark Mitchell  <>

	* class.c (walk_subobject_offsets): Recur on binfos as well as on
	(layout_nonempty_base_or_field): Pass it a binfo when processing a
	base class.
	(layout_empty_base): Likewise.
	(build_base_field): Likewise.

2002-11-27  Mark Mitchell  <>

	* class.c (build_base_field): Make sure we get the canonical base
	when descending through primary bases.

2002-11-26  Geoffrey Keating  <>

	* decl.c (check_initializer): Don't error on initialisation of
	a scalar with a brace-enclosed expression.

2002-11-26  Nathan Sidwell  <>

	* cp-tree.h (DECL_LANG_FLAG_4): Document more uses.
	(template_parms_equal): Remove prototype.
	* typeck.c (buuld_indirect_ref): Reformat.

2002-11-25  Jason Merrill  <>

	* init.c (build_vec_init): Use a FOR_STMT instead of an IF_STMT
	and a DO_STMT.

2002-11-25  Mark Mitchell  <>

	* tree.c (cp_build_qualified_type_real): Correct handling of
	array types.
	* class.c (walk_subobject_offsets): Fix thinko.
	(build_base_field): Record offsets of empty bases in primary
	virtual bases.
	(layout_class_type): Record offsets of empty bases in fields.

	* search.c (is_subobject_of_p_1): Fix thinko.
	(lookup_field_queue_p): Likewise.

2002-11-24  Mark Mitchell  <>

	* class.c (layout_class_type): Reuse tail padding when laying out
	virtual bases.

2002-11-22  Mark Mitchell  <>

	* rtti.c (qualifier_flags): Fix thinko.

2002-11-21  Gabriel Dos Reis  <>

	Remove traditional C constructs 1/n.
	* cp-tree.h (init_method, set_mangled_name_for_decl,
	build_opfncall, hack_identifier, make_thunk, use_thunk,
	synthesize_method, implicitly_declare_fn,
	skip_artificial_parms_for, optimize_function, calls_setjmp_p,
	maybe_clone_body): Remove use of PARAMS.

	* method.c (do_build_assign_ref, do_build_copy_constructor,
	synthesize_exception_spec, locate_dtor, locate_ctor, locate_copy):
	(synthesize_method): Use 'bool' type and constants instead of
	(locate_copy): Likewise.
	(implicitly_declare_fn): Likewise.

	* optimize.c (calls_setjmp_r, update_cloned_parm, dump_function):
	Remove old-style declaration.
	(maybe_clone_body): Use 'bool' type and constants.

2002-11-21  Glen Nakamura  <>

	PR c++/8342
	* typeck.c (get_member_function_from_ptrfunc): Make sure that a
	SAVE_EXPR for instance_ptr doesn't get evaluated first inside one
	of the branches of a COND_EXPR.

2002-11-19  Mark Mitchell  <>

	* pt.c (for_each_template_parm): Free allocated memory.
	* search.c (is_subobject_of_p_1): New function.
	(is_subobject_of_p): Avoid walking virtual bases multiple times.

2002-11-19  Jason Thorpe  <>

	* g++spec.c (lang_specific_spec_functions): New.

2002-11-15  Kazu Hirata  <>

	* ChangeLog: Follow spelling conventions.
	* class.c: Likewise.
	* decl2.c: Likewise.

2002-11-14  Zack Weinberg  <>

	* search.c (dfs_push_decls): Do not try to reorder elements
	3..n of method_vec if method_vec has only two elements.
	Reverse order of two tests to avoid accessing unallocated

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-09-02  Nathan Sidwell  <>

	* cp-tree.h (finish_builtin_type): Remove.
	* decl2.c (finish_builtin_type): Move to common code.
	* decl.c (build_ptrmemfunc_type): Adjust.
	* rtti.c (create_pseudo_type_info): Adjust.
	(create_tinfo_types): Adjust.

2002-08-31  Jason Merrill  <>

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

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

Copyright (C) 2002 Free Software Foundation, Inc.

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.