+2004-07-19 Kelley Cook <kcook@gcc.gnu.org>
+
+ * except.c: Remove two spurious carriage returns.
+
+2004-07-19 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/16623
+ * cp-tree.h (lang_type_class): Add lazy_assignment_op.
+ (CLASSTYPE_LAZY_ASSIGNMENT_OP): New macro.
+ * class.c (add_implicitly_declared_members): Use
+ CLASSTYPE_LAZY_ASSIGNMENT_OP.
+ * method.c (lazily_declare_fn): Clear
+ CLASSTYPE_LAZY_ASSIGNMENT_OP.
+ * search.c (lookup_fnfields_1): Check it.
+
+2004-07-19 Nathan Sidwell <nathan@codesourcery.com>
+
+ * class.c (add_method): Delay adding the slot until the end.
+ (determine_primary_base): Adjust VEC_iterate invokation.
+ (resort_type_method_vec, finish_struct_methods, warn_hidden,
+ walk_subobject_offsets, end_of_class, warn_about_ambiguous_bases,
+ build_vtbl_initializer): Likewise.
+ * init.c (sort_mem_initializers, build_delete, push_base_cleanups,
+ build_vbase_delete): Likewise.
+ * method.c (do_build_copy_constructor): Likewise.
+ * name-lookup.c (new_class_binding, print_binding_level,
+ poplevel_class, store_class_bindings, push_to_top_level,
+ pop_from_top_level): Likewise.
+ * pt.c (check_explicit_specialization): Likewise.
+ * search.c (lookup_conversion_operator, lookup_fnfields_1,
+ get_pure_virtuals, add_conversions, dfs_check_overlap,
+ binfo_for_vbase): Likewise.
+
+2004-07-19 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/12170
+ * pt.c (unify) <BOUND_TEMPLATE_TEMPLATE_PARM case>: Use only
+ innermost set of template arguments during deduction. Simplify.
+
+2004-07-19 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * typeck.c (build_modify_expr, build_x_modify_expr): Set
+ TREE_NO_WARNING on assignments with an operator other than '='.
+
+2004-07-10 Steven Bosscher <stevenb@suse.de>
+ Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * cp-tree.h (C_SET_EXP_ORIGINAL_CODE): Remove.
+ * decl2.c (grokfield): Don't check current_class_depth via
+ unused TREE_COMPLEXITY.
+ * semantics.c (finish_parenthesized_expr): Set TREE_NO_WARNING
+ to avoid the missing parentheses warning.
+ Don't set C_SET_EXP_ORIGINAL_CODE.
+
+2004-07-18 Mark Mitchell <mark@codesourcery.com>
+
+ * tree.c (no_linkage_helper): Remove.
+ (no_linkage_check): Don't use walk_tree_without_duplicates.
+
+ * mangle.c (write_expression): Issue a sorry for zero-operand
+ functional casts.
+
+2004-07-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
+
+ PR c++/13092
+ * init.c (build_offset_ref): Build SCOPE_REF with non-null
+ TREE_TYPE for non-dependent names.
+ * typeck.c (build_x_unary_op): Handle non-dependent SCOPE_REF.
+ * pt.c (type_dependent_expression_p): Handle SCOPE_REF with
+ unknown_type_node as its TREE_TYPE.
+ * cxx-pretty_print.c (pp_cxx_unqualified_id): Handle BASELINK.
+ * error.c (dump_decl) <SCOPE_REF case>: Use pp_expression.
+ (dump_expr) <SCOPE_REF case>: Likewise.
+
+2004-07-17 Jason Merrill <jason@redhat.com>
+
+ PR c++/16115
+ * call.c (type_passed_as): Make the invisible reference type
+ __restrict.
+ * cp-gimplify.c (gimplify_cleanup_stmt): Rename to
+ cp_genericize_r. Handle invisible reference lowering.
+ (is_invisiref_parm): New fn.
+ (cp_genericize): Adjust the types of invisible reference parms.
+ Don't repeat the walk for clones.
+ * decl.c (store_parm_decls): Don't generate any code for clones.
+
+2004-07-17 Joseph S. Myers <jsm@polyomino.org.uk>
+
+ * cp-tree.h (builtin_function): Declare.
+
+2004-07-16 Mark Mitchell <mark@codesourcery.com>
+
+ * class.c (finish_struct_methods): Remove unncessary code.
+ (add_implicitly_declared_members): Create declarations for default
+ constructors and copy constructors lazily.
+ * cp-tree.h (lang_type_class): Remove lazy_default_ctor and
+ lazy_copy_ctor.
+ (CLASSTYPE_LAZY_DEFAULT_CTOR): New macro.
+ (CLASSTYPE_LAZY_COPY_CTOR): Likewise.
+ * decl2.c (check_classfn): Robustify.
+ (locate_dtor): Handle empty CLASSTYPE_METHOD_VEC.
+ (locate_ctor): Handle lazy default constructors.
+ (locate_copy): Handle lazy copy constructors.
+ (implicitly_declare_fn): Make sure we're looking at the
+ TYPE_MAIN_VARIANT for a class before creating functions. Don't
+ set TYPE_HAS_CONSTRUCTOR.
+ (lazily_declare_fn): New function.
+ * name-lookup.c (constructor_name_full): Simplify.
+ * search.c (lookup_fnfields_1): Lazily create methods, as
+ necessary.
+ (lookup_for_overrides): Handle empty CLASSTYPE_METHOD_VEC.
+
+2004-07-16 Steven Bosscher <stevenb@suse.de>
+
+ * cp-tree.h (struct lang_type): Don't have three GTY options on a
+ single bit GTY desc.
+
+2004-07-16 Richard Henderson <rth@redhat.com>
+
+ * cp-lang.c (LANG_HOOKS_TREE_INLINING_COPY_RES_DECL_FOR_INLINING): Die.
+ * cp-tree.h (cp_copy_res_decl_for_inlining): Remove.
+ * tree.c (cp_copy_res_decl_for_inlining): Remove.
+
+2004-07-16 Nathan Sidwell <nathan@codesourcery.com>
+
+ * class.c (finish_struct_bits): Use for loop.
+ (propagate_binfo_offsets): Do primary binfo outside of loop.
+
+ PR c++/16583
+ * dump.c (cp_dump_tree): Don't dump the bases if there's no
+ binfo.
+
+ * pt.c (tsubst) <TREE_BINFO case>: We should never get here.
+
+2004-07-15 Mark Mitchell <mark@codesourcery.com>
+
+ * cp-tree.h (lang_type_class): Remove has_real_assign_ref and
+ has_abstract_assign_ref. Make methods a VEC(tree) *.
+ (TYPE_HAS_CONST_ASSIGN_REF): Add documentation.
+ (CLASSTYPE_CONSTRUCTORS): Adjust for changes to CLASSTYPE_METHOD_VEC.
+ (CLASSTYPE_DESTRUCTORS): Likewise.
+ (TYPE_HAS_REAL_ASSIGN_REF): Remove.
+ (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
+ (add_method): Change prototoype.
+ * class.c (add_method): Remove error_p parameter. Adjust for
+ changes to CLASSTYPE_METHOD_VEC.
+ (handle_using_decl): Adjust call to add_method.
+ (maybe_warn_about_overly_private_class): Adjust for
+ changes to CLASSTYPE_METHOD_VEC.
+ (resort_type_method_vec): Likewise.
+ (finish_struct_methods): Likewise.
+ (check_for_override): Likewise.
+ (warn_hidden): Likewise.
+ (add_implicitly_declared_members): Defer creation of assignment
+ operators. Adjust call to add_method.
+ (clone_function_decl): Adjust call to add_method.
+ (check_bases_and_members): Don't set TYPE_HAS_REAL_ASSIGN_REF.
+ (finish_struct_1): Use CLASSTYPE_DESTRUCTORS.
+ * decl.c (grok_special_member_properties): Don't set
+ TYPE_HAS_ABSTRACT_ASSIGN_REF.
+ * decl2.c (check_classfn): Adjust for
+ changes to CLASSTYPE_METHOD_VEC.
+ * method.c (locate_dtor): Use CLASSTYPE_DESTRUCTORS.
+ (locate_ctor): Use CLASSTYPE_CONSTRUCTORS.
+ (locate_copy): Adjust for changes to CLASSTYPE_METHOD_VEC.
+ (implicitly_declare_fn): Set DECL_SOURCE_LOCATION. Do not call
+ cp_finish_decl.
+ * pt.c (check_explicit_specialization): Adjust for
+ changes to CLASSTYPE_METHOD_VEC.
+ (instantiate_class_template): Do not set
+ TYPE_HAS_ABSTRACT_ASSIGN_REF.
+ * ptree.c (cxx_print_type): Don't try to print
+ CLASSTYPE_METHOD_VEC.
+ * rtti.c (emit_support_tinfos): Use CLASSTYPE_DESTRUCTORS.
+ * search.c (lookup_field_r): Adjust for
+ changes to CLASSTYPE_METHOD_VEC.
+ (lookup_fnfields): Likewise.
+ (lookup_conversion_operator): Likewise.
+ (lookup_fnfields_1): Likewise. Create assignment operators
+ lazily.
+ (look_for_overrides_here): Adjust for
+ changes to CLASSTYPE_METHOD_VEC.
+ (add_conversions): Likewise.
+ * semantics.c (finish_member_declaration): Adjust call to add_method.
+
+2004-07-15 Jason Merrill <jason@redhat.com>
+
+ * cp-lang.c (cxx_types_compatible_p): To the middle-end,
+ references and pointers are compatible.
+
+2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
+
+ * decl.c (xref_basetypes): Refactor.
+ * tree.c (copy_base_binfos): Replace with ...
+ (copy_binfo): ... this. Deep copy the given binfo, (not the just
+ bases of the given base).
+ * cp-tree.h (copy_base_binfo): Remove.
+ (copy_binfo): Declare.
+
+2004-07-15 Mark Mitchell <mark@codesourcery.com>
+
+ * name-lookup.c (set_inherited_value_binding_p): Add class_type
+ parameter.
+ (get_class_binding): Adjust.
+ (push_class_level_binding): Don't use set_inherited_value_binding_p.
+
+2004-07-15 Nathan Sidwell <nathan@codesourcery.com>
+
+ * class.c (finish_struct_bits): Don't set TYPE_HAS_CONVERSION here.
+ * decl.c (xref_basetypes): Set it here.
+
+ * class.c (check_bases): Don't set CLASSTYPE_NON_AGGREGATE here.
+ Don't check for incomplete base.
+ (get_vfield_name): Simplify while loop.
+ * decl.c (xref_basetypes): Set CLASSTYPE_NON_AGGREGATE here.
+
+2004-07-14 Mark Mitchell <mark@codesourcery.com>
+
+ * lex.c (cxx_make_type): Remove call to get_pointer_type.
+
+ * cp-tree.h (IDENTIFIER_VALUE): Remove.
+ (BINFO_PUSHDECLS_MARKED): Likewise.
+ (maybe_inject_for_scope_var): Likewise.
+ (push_class_decls): Likewise.
+ * name-lookup.h (push_class_binding): Remove.
+ (innermost_non_namespace_value): New function.
+ (outer_binding): Likewise.
+ * class.c (add_method): Push bindings before adding to
+ TYPE_METHODS.
+ (restore_class_cache): Do not restore class_shadowed.
+ (pushclass): Do not add USING_DECLs. Do not call
+ push_class_decls.
+ * config-lang.in (gtfiles): Remove $(srcdir)/cp/search.c.
+ * decl.c (pushdecl): Use outer_binding.
+ (poplevel): Set the scope for an out-of-scope for-loop declaration
+ appropriately.
+ (cp_finish_decl): Don't call maybe_inject_for_scope_var.
+ * name-lookup.c (new_class_binding): New function.
+ (push_binding): Use it.
+ (pushdecl): Use innermost_non_namespace_value.
+ (maybe_inject_for_scope_var): Remove.
+ (push_class_binding): Remove.
+ (set_inherited_value_binding_p): New function.
+ (get_class_binding): New function.
+ (push_class_level_binding): Assert that the current_class_type is
+ being defined.
+ (outer_binding): New function.
+ (innermost_non_namespace_value): Likewise.
+ (lookup_name_real): Use outer_binding.
+ (lookup_name_current_level): Ignore out-of-scope variables.
+ * pt.c (check_template_shadow): Use innermost_non_namespace_value.
+ (lookup_template_class): Likewise.
+ * search.c (dfs_push_type_decls): Remove.
+ (dfs_push_decls): Likewise.
+ (setup_class_bindings): Likewise.
+ (lookup_field_1): Handle USING_DECLs from dependent scopes.
+ (marked_pushdecls_p): Remove.
+ (unmarked_pushdecls_p): Remove.
+ (marked_identifiers): Remove.
+ (setup_class_bindings): Remove.
+ (dfs_push_type_decls): Remove.
+ (dfs_push_decls): Remove.
+ (push_class_decls): Remove.
+
+2004-07-13 Mark Mitchell <mark@codesourcery.com>
+
+ PR c++/16518
+ PR c++/16337
+ * decl.c (grokvardecl): Make declspecs parameter const.
+ (grokdeclarator): Likewise. Adjust accordingly.
+ * decl.h (grokdeclarator): Adjust declaration.
+ * parser.c (cp_parser_init_declarator): Do not clear
+ decl_specifiers->attributes.
+
+ * cp-tree.h (lang_identifier): Remove class_value.
+ (IDENTIFIER_CLASS_VALUE): Remove.
+ (pop_class_decls): Likewise.
+ (init_search_processing): Likewise.
+ * class.c (handle_using_decl): Use lookup_member, not
+ IDENTIFIER_CLASS_VALUE.
+ (restore_class_cache): New function, split out from ...
+ (pushclass): ... here. Do not call clear_identifier_class_values.
+ (invalidate_class_lookup_cache): Do not clear
+ IDENTIFIER_CLASS_VALUE.
+ (popclass): Do not call pop_class_decls.
+ (maybe_note_name_used_in_class): Do not save names looked up after
+ the class is complete. Use lookup_member, not
+ IDENTIFIER_CLASS_VALUE.
+ * config-lang.in (gtfiles): Add $(srcdir)/cp/search.c.
+ * decl.c (cxx_init_decl_processing): Do not call
+ init_search_processing.
+ * method.c (do_build_copy_constructor): Remove unnecessary code.
+ (do_build_assign_ref): Likewise.
+ * name-lookup.c (pushdecl): Use lookup_member, not
+ IDENTIFIER_CLASS_VALUE.
+ (set_identifier_type_value_with_scope): Set TREE_TYPE on the
+ type_shadowed list.
+ (poplevel_class): Do not restore IDENTIFIER_CLASS_VALUE.
+ (push_class_binding): Do not set it.
+ (clear_identifier_class_values): Remove.
+ (push_class_level_binding): Do not set IDENTIFIER_CLASS_VALUE.
+ (store_binding): Do not save it.
+ (pop_from_top_level): Do not restore it.
+ * name-lookup.h (cxx_saved_binding): Remove class_value.
+ (clear_identifier_class_values): Remove.
+ * ptree.c (cxx_print_identifier): Do not print
+ IDENTIFIER_CLASS_VALUE.
+ * search.c (search_obstack): Remove.
+ (push_stack_level): Remove.
+ (pop_stack_level): Remove.
+ (search_level): Remove.
+ (search_stack): Remove.
+ (lookup_member): Don't check IDENTIFIER_CLASS_VALUE.
+ (setup_class_bindings): Use IDENTIFIER_MARKED, not
+ IDENTIFIER_CLASS_VALUE.
+ (marked_identifiers): New variable.
+ (push_class_decls): Clear IDENTIFIER_MARKED.
+ (pop_class_decls): Don't call pop_search_level.
+ (init_search_processing): Remove.
+
+2004-07-12 Mark Mitchell <mark@codesourcery.com>
+
+ * cp-tree.h (get_aggr_typedef): Remove.
+ * init.c (get_aggr_typedef): Likewise.
+
+ * name-lookup.c (push_class_level_binding): Simplify.
+
+2004-07-12 Andrew Pinski <apinski@apple.com>
+
+ PR c++/16475
+ Revert:
+ 2004-07-07 H.J. Lu <hongjiu.lu@intel.com>
+ PR c++/16276
+ * rtti.c (emit_tinfo_decl): Turn off DECL_ONE_ONLY if typeinfo
+ is not public.
+
+2004-07-12 Eric Christopher <echristo@redhat.com>
+
+ * parser.c (cp_parser_class_head): Remove unused variable.
+
+2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
+
+ * decl.c (grok_op_properties): Reject [de-]allocation functions
+ declared in a namespace, or declared as static.
+
+2004-07-12 Nathan Sidwell <nathan@codesourcery.com>
+
+ * cp-tree.h (make_binfo): Remove.
+ * decl.c (xref_basetypes): Use make_tree_binfo directly.
+ * tree.h (copy_base_binfos): Likewise.
+ (make_binfo): Remove.
+
+ * call.c (build_user_type_conversion_1, build_new_op,
+ check_constructor_callable, build_temp,
+ perform_direct_initialization_of_possible): Pass type directly to
+ lookup_fnfields & build_special_member_call.
+ (build_special_member_call): Accept a type, and complete it.
+ * class.c (finish_stuct_bits): Copy the BINFOs here.
+ * cvt.c (ocp_convert): Pass type directly to
+ build_special_member_call.
+ * decl.c (build_ptrmemfunc_type): Call xref_bastypes here.
+ (xref_basetypes): Allocate the binfo here. Adjust.
+ * init.c (build_init, build_new_1): Pass type directly to
+ build_special_member_call.
+ * lex.c (cxx_make_type): Do not allocate binfo here.
+ * name-lookup.c (arg_assoc_class): Incomplete types have no binfo.
+ * parser.c (cp_parser_class_head): Always call xref_basetypes.
+ * pt.c (instantiate_class_template): Likewise. Inhibit access
+ checking for template friends.
+ * ptree.c (cxx_print_type): Adjust record printing.
+ * search.c (lookup_base): When taking a type, complete it before
+ looking for a binfo.
+ (lookup_member): Delay completing a type.
+ (push_class_decls): Don't walk an incomplete type.
+ (lookup_conversions): Likewise.
+ * semantics.c (finish_stmt_expr_expr): Pass type directly to
+ build_special_member_call.
+ * tree.c (copy_base_binfos): Adjust.
+ (make_binfo): Likewise.
+ * typeck.c (build_modify_expr): Pass type directly to
+ build_special_member_call.
+ * typeck2.c (process_init_constructor): Check a binfo exists.
+ (build_m_component_ref): Allow accessing an incomplete type.
+ (build_functional_cast): Pass type directly to
+ build_special_member_call.
+
+2004-07-12 Giovanni Bajo <giovannibajo@gcc.gnu.org>
+
+ PR c++/2204
+ * config-lang.in (gtfiles): Add typeck2.c.
+ * Make-lang.in: Tweak typeck2.c dependencies, and add rule for
+ gt-cp-typeck2.h.
+ * cp-tree.h: Declare complete_type_check_abstract.
+ * typeck2.c (pat_calc_hash, pat_compare,
+ complete_type_check_abstract): New functions.
+ (abstract_virtuals_error): If the type is abstract, register the
+ declaration within abstract_pending_vars for further checks.
+ Inspect also dependent types. Handle IDENTIFIER_NODEs as decl.
+ * decl.c (cp_finish_decl): Do not strip array types.
+ (create_array_type_for_decl): Check for abstractness of the element
+ type.
+ (complete_vars): Call complete_type_check_abstract.
+ * class.c (finish_struct): Prepare a list of virtual functions for
+ template types, and call complete_vars on it to check for abstractness.
+
+2004-07-12 Paolo Bonzini <bonzini@gnu.org>
+
+ PR tree-optimization/14107
+ * decl.c (finish_function): Remove temporary band-aid.
+
2004-07-11 Mark Mitchell <mark@codesourcery.com>
+ * call.c (build_operator_new_call): Avoid using push_to_top_level.
+ (build_new_op): Adjust call to lookup_function_nonclass.
+ * name-lookup.c (identifier_type_value): Adjust call to
+ lookup_name_real.
+ (lookup_name_real): Add block_p parameter.
+ (lookup_name_nonclass): Adjust call to lookup_name_real.
+ (lookup_function_nonclass): Likewise.
+ (lookup_name): Likewise.
+ * name-lookup.h (lookup_name_real): Change prototype.
+ (lookup_name_nonclass): Likewise.
+ * parser.c (cp_parser_lookup_name): Likewise.
+
* cp-tree.h (saved_scope): Make old_bindings a vector.
(unuse_fields): Remove.
* name-lookup.h (cxx_saved_binding): Define it.
push_base_cleanups): Likewise.
* method.c (do_build_copy_constructor, do_build_assign_reg,
synthesize_exception_spec): Likewise.
- * name-lookup.c (arg_assoc_class):
+ * name-lookup.c (arg_assoc_class): Likewise.
* pt.c (instantiate_class_template, tsubst,
- get_template_base_recursive):
- * ptree.c (cxx_print_type):
+ get_template_base_recursive): Likewise.
+ * ptree.c (cxx_print_type): Likewise.
* rtti.c (get_psuedo_ti_init, get_pseudo_ti_desc): Likewise.
* search.c (lookup_base_r, dynamic_cast_base_recurse,
dfs_access_in_type, access_in_type, lookup_field_queue_p,