+2002-12-28 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ 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 <mark@codesourcery.com>
+
+ * Make-lang.in (po-generated): Remove parse.c.
+ (CXX_OBJS): Remove parse.o and spew.o. Add parser.o.
+ ($(srcdir)/cp/parse.h): Remove target.
+ ($(srcdir)/cp/parse.c): Likewise.
+ (gt-cp-parse.h): Likewise.
+ (gt-cp-parser.h): New target.
+ (c++.distclean): Do not remove parse.output.
+ (c++.maintainer-clean): Do not remove parse.c or parse.h.
+ (cp/spew.o): Remove target.
+ (cp/lex.o): Adjust dependencies.
+ (cp/pt.o): Likewise.
+ (cp/parse.o): Likewise.
+ (cp/TAGS): Do not mention parse.c.
+ (cp/parser.o): New target.
+ * NEWS: Mention the new parser.
+ * call.c (build_scoped_method_call): Simplify.
+ (build_method_call): Likewise.
+ (build_new_function_call): Adjust calls to add_function_candidate
+ and add_template_candidate.
+ (build_new_op): Improve handling of erroroneous operands.
+ (convert_default_arg): Remove circular argument processing.
+ (name_as_c_string): New function.
+ (build_new_method_call): Use it.
+ (perform_implicit_conversion): Use error_operand_p.
+ * class.c (finish_struct_anon): Use constructor_name_p.
+ (check_field_decls): Likewise.
+ (pop_nested_class): Use OVL_NEXT, not OVL_CHAIN.
+ (resolve_address_of_overloaded_function): Likewise.
+ (instantiate_type): Tweak pointer-to-member handling.
+ (get_primary_binfo): Remove incorrect assertion.
+ * config-lang.in (gtfiles): Add parser.c, remove parse.c.
+ * cp-tree.h (DEFARG_TOKENS): New macro.
+ (default_arg): New structure.
+ (cp_tree_node_structure_enum): Add TS_CP_DEFAULT_ARG.
+ (lang_tree_node): Add default_arg.
+ (cp_tree_index): Add CPTI_TYPE_INFO_REF_TYPE.
+ (type_info_ref_type): New macro.
+ (saved_scope): Make processing_explicit_instantiation a boolean.
+ (check_access): New field.
+ (unparsed_text): Remove.
+ (language_function): Remove unparsed_inlines.
+ (error_operand_p): New macro.
+ (lang_decl): Adjust pending_inline_info.
+ (DEFARG_POINTER): Remove.
+ (tag_types): Add typenames.
+ (lookup_ualified_name): Declare.
+ (lookup_name_real): Likewise.
+ (shadow_tag): Adjust prototype.
+ (get_scope_of_declarator): Declare it.
+ (process_next_inline): Remove it.
+ (check_for_missing_semicolon): Likewise.
+ (maybe_get_template_decl_from_type_decl): Declare it.
+ (finish_label_stmt): Adjust prototype.
+ (finish_non_static_data_meber): Declare it.
+ (finish_pseudo_destructor_call_expr): Rename to ...
+ (finish_pseudo_destructor_expr): ... this.
+ (finish_compound_literal): Declare it.
+ (begin_inline_definitions): Remove it.
+ (init_spew): Remove.
+ (peekyylex): Likewise.
+ (arbitrate_lookup): Likewise.
+ (frob_opname): Likewise.
+ (maybe_snarf_defarg): Likewise.
+ (add_defarg_fn): Likewise.
+ (do_pending_defargs): Likewise.
+ (done_pending_defargs): Likewise.
+ (unprocessed_defarg_fn): Likewise.
+ (replace_defarg): Likewise.
+ (end_input): Likewise.
+ (get_overloaded_fn): Likewise.
+ * cvt.c (convert_to_reference): Improve error handling.
+ * decl.c (lookup_name_real): Do not declare it static.
+ (maybe_push_to_top_level): Set check_access.
+ (identifier_type_value): Adjust call to lookup_name_real.
+ (lookup_qualified_name): New method.
+ (lookup_name_real): Remove special-case parsing code.
+ (lookup_name-nonclass): Adjust call to lookup_name_real.
+ (lookup_name_namespace_only): Likewise.
+ (lookup_name): Likewise.
+ (check_tag_decl): Return the type declared.
+ (shadow_tag): Likewise.
+ (register_dtor_fn): Tweak check_access.
+ (grokfndecl): Use constructor_name_p.
+ (get_scope_of_declarator): New function.
+ (grokdeclarator): Obscure tweaks for slightly different declarator
+ representations.
+ (start_method): Return error_mark_node to indicate failure.
+ (cp_tree_node_structure_enum): Use TS_CP_DEFAULT_ARG for DEFAULT_ARGs.
+ * decl2.c (constructor_name_full): Simplify.
+ (constructor_name): Use it.
+ (build_expr_from_tree): Adjust for changes to do new parser.
+ (push_scope): Improve robustness.
+ (validate_nonmember_using_decl): Process declarations, not names.
+ (do_class_using_decl): Likewise.
+ (handle_class_head): Do not mess with CLASSTYPE_DECLARED_CLASS
+ here.
+ * error.c (dump_expr): Handle IDENTIFIER_NODEs and BASELINKs.
+ * expr.c (cxx_expand_expr): Handle BASELINKs.
+ * init.c (member_init_ok_or_else): Issue more errors.
+ (build_offset_ref): Tweak handling of FUNCTION_DECLs.
+ * lex.c: Do not include parse.h.
+ (yypring): Do not declare.
+ (yylval): Likewise.
+ (make_reference_declarator): Remove error-generating code.
+ (rid_to_yy): Remove.
+ (cxx_init): Do not call init_spew.
+ (yypring): Remove.
+ (check_for_missing_semicolon): Remove.
+ * lex.h (got_scope): Remove.
+ (got_object): Remove.
+ * method.c (hack_identifier): Use finish_non_static_data_member.
+ (implicitly_declare_fn): Adjust use of constructor_name.
+ * parser.c: New file.
+ * pt.c (parse.h): Do not include it.
+ (maybe_get_template_decl_from_template): Do not declare it.
+ (finish_member_template_decl): Tweak.
+ (begin_explicit_instantiation): Adjust for
+ processing_explicit_instantiation being boolean.
+ (end_explicit_instantiation): Likewise.
+ (maybe_process_partial_specialization): Tighten specialization
+ test.
+ (retrieve_local_specialization): Adjust ue of hash table.
+ (eq_local_specializations): New function.
+ (register_local_specialization): Likewise.
+ (push_template_decl_real): Remove unnecessary test.
+ (maybe_get_template_decl_from_type_decl): Don't make it static.
+ (for_each_template_parm_r): Handle TYPEOF_TYPE.
+ (tsubst_copy): Use retrieive_local_specialization to handle
+ PARM_DECL. Adjust handling of CONST_DECLs. Handle BASELINKs.
+ Handle COMPONENT_REFs with pseudo-destructor-expressions.
+ Simplify handling of CALL_EXPR and METHOD_CALL_EXPR.
+ (tsubst_expr): Pass decls, not names, to do_local_using_decl.
+ (unify): Tweak handling of CONST_DECLs.
+ (regenerate_decl_from_template): Use push_nested_class.
+ (template_for_substitution): New funciton.
+ (instantiate_decl): Use it. Register parameters as local
+ specializations.
+ * rtti.c (init_rtti_processing): Set type_info_ref_type.
+ (build_typeid): Use it.
+ (get_typeid): Likeise.
+ * search.c (accessible_p): Use check_access, not
+ flag_access_control.
+ (adjust_result_of_qualified_name_lookup): Pay attention to the
+ context_class.
+ * semantics.c (finish_asm_stmt): Adjust error handling.
+ (finish_label_stmt): Return the statement.
+ (finish_non_static_data_member): New function.
+ (finish_class_expr): Handle BASELINKs.
+ (finish_call_expr): Handle PSEUDO_DTOR_EXPR.
+ (finish_object_call_expr): Simplify handling during templates.
+ (finish_pseudo_destructor_call_expr): Rename to ...
+ (finish_pseudo_dtor_expr): ... this.
+ (finish_compound_literal): New function.
+ (begin_inline_definitions): Remove.
+ (finish_sizeof): Remove special template handling.
+ * spew.c: Do not include parse.h.
+ * tree.c (get_overloaded_fn): Remove.
+ * typeck.c (build_class_member_access_expr): Handle
+ PSEUDO_DTOR_EXPR. Adjust handling of static member functions.
+ (lookup_destructor): New function.
+ (finish_class_member_access_expr): Use it.
+ (convert_arguments): Simplify.
+ (build_unary_op): Handle BASELINKs.
+
+2002-12-26 Nathan Sidwell <nathan@codesourcery.com>
+
+ PR c++/4803
+ * decl2.c (mark_used): Defer inline functions.
+ (finish_file): Merge deferred_fns loops. Check all used
+ inline functions have a definition.
+ * method.c (make_thunk): Thunks are not inline.
+
+ PR c++/5116, c++/764
+ * call.c (build_new_op): Make sure template class operands are
+ instantiated.
+
+2002-12-24 Nathan Sidwell <nathan@codesourcery.com>
+
+ 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 <gdr@integrable-solutions.net>
+
+ 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 <nathan@codesourcery.com>
+
+ 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 <lerdsuwa@users.sourceforge.net>
+
+ * 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 <kazu@cs.umass.edu>
+
+ * ChangeLog: Fix a typo.
+ * class.c: Fix comment typos.
+ * cp-tree.h: Likewise.
+
+2002-12-18 Jason Merrill <jason@redhat.com>
+
+ 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 <lerdsuwa@users.sourceforge.net>
+
+ PR c++/8099
+ * friend.c (make_friend_class): Allow partial specialization
+ when declaration is not a template friend.
+
+2002-12-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/3663
+ * pt.c (lookup_template_class): Copy TREE_PRIVATE and
+ TREE_PROTECTED to created decl nodes.
+
+2002-12-18 Mark Mitchell <mark@codesourcery.com>
+
+ * class.c (build_base_field): Do not set DECL_PACKED on the
+ FIELD_DECL.
+
+2002-12-18 Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+ * cp-tree.h (struct tree_srcloc): Use location_t.
+ (SOURCE_LOCUS): New.
+ (SRCLOC_FILE, SRCLOC_LINE): Adjust.
+
2002-12-17 Jason Merrill <jason@redhat.com>
* decl.c (finish_function): Also complain about no return in
* parse.y (asm_operand): Allow named operands.
* semantics.c (finish_asm_stmt): Tweek for changed location
- of the operand constrant.
+ of the operand constraint.
2001-10-09 Jason Merrill <jason_merrill@redhat.com>