OSDN Git Service

* c-common.h (check_case_value): Remove prototype.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index 0cf8261..0a038fc 100644 (file)
@@ -1,3 +1,278 @@
+2004-07-20  Steven Bosscher  <stevenb@suse.de>
+
+       * cp-tree.h (struct lang_decl_flags): Unify the template_info and
+       thunk_alias, and the access and virtual_offset fields.
+       (THUNK_VIRTUAL_OFFSET, THUNK_ALIAS): Adjust.
+       * decl.c (finish_case_label): Update c_add_case_node call.
+
+2004-07-19  Mark Mitchell  <mark@codesourcery.com>
+
+       Revert patch for PR c++/16623.
+       
+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
        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,