OSDN Git Service

* class.c (build_base_path): Use build_address directly.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index d654d65..97296e9 100644 (file)
@@ -1,3 +1,296 @@
+2004-08-30  Richard Henderson  <rth@redhat.com>
+
+       * class.c (build_base_path): Use build_address directly.
+       * typeck.c (build_unary_op): Don't lower &a.b to pointer
+       arithmetic directly.
+       * typeck2.c (store_init_value): Don't assume !TREE_CONSTANT
+       means !initializer_constant_valid_p.
+
+2004-08-30  Richard Henderson  <rth@redhat.com>
+
+       * class.c (fixed_type_or_null): Use get_base_address before
+       assuming an ADDR_EXPR is non-null.
+
+2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * name-lookup.c (pop_binding, pushdecl,
+       set_identifier_type_value_with_scope, push_overloaded_decl,
+       arg_assoc_type): Replace abort with gcc_assert or gcc_unreachable.
+       * parser.c (cp_parser_diagnose_invalid_type_name,
+       cp_parser_postfix_expression, cp_parser_unary_expression,
+       cp_parser_check_declarator_template_para): Likewise.
+       * pt.c (push_inline_template_parms_recursive,
+       check_explicit_specialization, convert_nontype_argument,
+       coerce_template_template_parms, uses_template_parms,
+       instantiate_class_template, tsubst_decl, tsubst, tsubst_copy,
+       tsubst_expr, instantiate_template,
+       maybe_adjust_types_for_deduction, type_unification_real,
+       resolve_overloaded_unification, template_decl_level,
+       type_dependent_expression_p): Likewise.
+       * search.c (lookup_base_r): Likewise.
+       * semantics.c (finish_stmt_expr, simplify_aggr_init_expr): Likewise.
+       * tree.c (lvalue_p_1, count_functions, cxx_printable_name,
+       verify_stmt_tree_r, get_type_decl, stabilize_call): Likewise.
+       * typeck.c (common_type, get_member_function_from_ptrfunc,
+       build_binary_op, build_unary_op, expand_ptrmemfunc_cst): Likewise.
+       * typeck2.c (cxx_incomplete_type_diagnostic,
+       split_nonconstant_init_1, store_init_value,
+       process_init_constructor): Likewise.
+
+2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * call.c (check_dtor_name): Replace abort with gcc_assert or
+       gcc_unreachable.
+       (build_call, add_builtin_candidate, build_new_op,
+       convert_like_real, build_over_call, in_charge_arg_for_name,
+       source_type, joust): Likewise.
+       * class.c (build_simple_base_path, get_vcall_index,
+       finish_struct_1, instantiate_type, get_enclosing_class,
+       add_vcall_offset_vtbl_entries_1, cp_fold_obj_type_ref): Likewise.
+       * cp-gimplify.c (cp_genericize): Likewise.
+       * cp-lang.c (cp_expr_size, cp_tree_size): Likewise.
+       * cvt.c (cp_convert_to_pointer, ocp_convert): Likewise.
+       * decl.c (poplevel, make_unbound_class_template, reshape_init,
+       check_special_function_return_type, grokdeclarator,
+       grok_op_properties, tag_name, xref_tag, start_preparsed_function,
+       finish_function): Likewise.
+       * decl2.c (grokfield, maybe_emit_vtables):Likewise.
+       * error.c (dump_global_iord, dump_decl, dump_template_decl,
+       language_to_string): Likewise.
+       * except.c (choose_personality_routine): Likewise.
+       * friend.c (do_friend): Likewise.
+       * g++spec.c (lang_specific_driver): Likewise.
+       * init.c (build_zero_init, expand_default_init, build_new_1,
+       build_vec_delete_1, build_vec_init, build_dtor_call): Likewise.
+       * lex.c (retrofit_lang_decl, cp_type_qual_from_rid): Likewise.
+       * mangle.c (add_substitution, write_unscoped_name,
+       write_template_prefix, write_identifier,
+       write_special_name_destructor, write_type, write_builtin_type,
+       write_expression, write_template_param,
+       write_java_integer_type_codes): Likewise.
+       * method.c (implicitly_declare_fn): Likewise.
+
+2004-08-30  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * cp-tree.h (BINFO_PRIMARY_P): Use a binfo flag.
+       (BINFO_INDIRECT_PRIMARY_P): Remove.
+       * class.c (determine_primary_base): Rename to ...
+       (determine_primary_bases): ... here.  Set all primary bases.
+       (set_primary_base): Remove.
+       (mark_primary_bases): Remove.
+       (build_simple_base_path, walk_subobject_offsets,
+       propagate_binfo_offsets, end_of_class): Adjust.
+       (layout_class_type): Rename determine_primary_base call.
+       (dump_class_hierarchy_r, dump_vtable): Adjust. Don't pass a binfo
+       to type_as_string.
+       (dfs_build_secondary_vptr_vtt_inits, dfs_accumulate_vtbl_inits,
+       build_rtti_vtbl_entries): Adjust.
+       * init.c (build_vtbl_address): Adjust.
+
+       * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Use gcc_assert.
+
+2004-08-28  Ziemowit Laski  <zlaski@apple.com>
+
+       * Make-lang.in (CXX_OBJS): Split up into CXX_OBJS and
+       CXX_AND_OBJCXX_OBJS.
+       (CXX_C_OBJS): Include in CXX_AND_OBJCXX_OBJS instead of listing
+       separately on the link line.
+
+2004-08-28  Jason Merrill  <jason@redhat.com>
+
+       * decl.c (expand_static_init): Avoid bogus warnings.
+
+2004-08-27  Jason Merrill  <jason@redhat.com>
+
+       PR c++/16851
+       * tree.c (stabilize_init): See through a COMPOUND_EXPR.
+
+       PR c++/13684
+       * decl.c (expand_static_init): Use thread-safety API.
+       (register_dtor_fn): Return the call, don't expand it.
+       * tree.c (add_stmt_to_compound): New fn.
+       (stabilize_call): Use it.
+
+2004-08-27  Richard Henderson  <rth@redhat.com>
+
+       * cp-tree.def (OFFSETOF_EXPR): New.
+       * parser.c (cp_parser_builtin_offsetof): Either built an
+       OFFSETOF_EXPR, or call fold_offsetof immediately.
+       * pt.c (tsubst_expr): Handle OFFSETOF_EXPR.
+
+2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * call.c (validate_conversion_obstack): Replace
+       my_friendly_assert with gcc_assert or gcc_unreachable.
+       (direct_reference_binding, merge_conversion_sequences,
+       build_user_type_conversion_1, perform_overload_resolution,
+       build_op_delete_call, enforce_access, call_builtin_trap,
+       build_over_call, build_special_member_call, build_new_method_call,
+       initialize_reference): Likewise.
+       * class.c (build_base_path, build_primary_vtable, alter_access,
+       check_bases, update_vtable_entry_for_fn, layout_empty_base,
+       clone_function_decl, adjust_clone_args,
+       type_requires_array_cookie, include_empty_classes,
+       finish_struct_1, resolve_address_of_overloaded_function,
+       instantiate_type, get_vtbl_decl_for_binfo, build_vtt_inits,
+       dfs_build_secondary_vptr_vtt_inits, build_ctor_vtbl_group,
+       accumulate_vtbl_inits, build_vtbl_initializer,
+       build_vbase_offset_vtbl_entries, build_rtti_vtbl_entries): Likewise.
+       * cvt.c (build_up_reference, convert_to_reference): Likewise.
+       * decl.c (poplevel, duplicate_decls, make_typename_type,
+       cxx_init_decl_processing, reshape_init, check_initializer,
+       make_rtl_for_nonlocal_decl, initialize_local_var, cp_finish_decl,
+       expand_static_init, grokfndecl, grokvardecl, build_ptrmem_type,
+       grokdeclarator, copy_fn_p, grok_op_properties, xref_tag,
+       xref_basetypes, start_preparsed_function, save_function_data,
+       finish_function, finish_method, maybe_register_incomplete_var,
+       complete_vars): Likewise.
+       * decl2.c (grok_array_decl, check_member_template,
+       check_classfn, finish_static_data_member_decl, coerce_new_type,
+       coerce_delete_type, import_export_class, decl_needed_p,
+       determine_visibility, import_export_decl, build_cleanup,
+       start_static_initialization_or_destructi, do_static_destruction,
+       prune_vars_needing_no_initialization,
+       build_offset_ref_call_from_tree): Likewise.
+       * error.c (dump_decl, dump_expr): Likewise.
+       * init.c (finish_init_stmts, build_zero_init,
+       expand_virtual_init, expand_default_init, expand_aggr_init_1,
+       build_offset_ref, build_new_1, build_delete, build_vbase_delete):
+       Likewise.
+       * mangle.c (write_method_parms, write_template_args,
+       write_expression, write_template_arg): Likewise.
+       * method.c (make_thunk, finish_thunk, use_thunk): Likewise.
+       * name-lookup.c (pop_binding, begin_scope, leave_scope,
+       resume_scope, push_using_decl, validate_nonmember_using_decl,
+       is_ancestor, poplevel_class, set_inherited_value_binding_p,
+       push_class_level_binding, do_class_using_decl, push_namespace,
+       pop_namespace, add_using_namespace, ambiguous_decl,
+       lookup_namespace_name, lookup_type_current_level,
+       maybe_process_template_type_declaration): Likewise.
+       * parser.c (cp_lexer_peek_nth_token,
+       cp_parser_parse_and_diagnose_invalid_typ,
+       cp_parser_translation_unit, cp_parser_template_id,
+       cp_parser_lookup_name, cp_parser_late_parsing_for_member): Likewise.
+       * pt.c (push_access_scope, finish_member_template_decl,
+       push_inline_template_parms_recursive, add_outermost_template_args,
+       get_innermost_template_args, begin_explicit_instantiation,
+       end_explicit_instantiation, retrieve_specialization,
+       is_specialization_of, is_specialization_of_friend,
+       register_specialization, check_explicit_specialization,
+       comp_template_parms, process_template_parm,
+       process_partial_specialization, convert_nontype_argument,
+       coerce_template_template_parms, coerce_template_parms,
+       mangle_class_name_for_template, lookup_template_function,
+       lookup_template_class, instantiate_class_template, tsubst_decl,
+       tsubst_function_type, tsubst, tsubst_qualified_id, tsubst_copy,
+       instantiate_template, fn_type_unification, type_unification_real,
+       get_template_base, regenerate_decl_from_template,
+       template_for_substitution, instantiate_decl,
+       get_mostly_instantiated_function_type, dependent_scope_ref_p,
+       value_dependent_expression_p, resolve_typename_type): Likewise.
+       * repo.c (repo_emit_p): Likewise.
+       * rtti.c (build_headof, get_tinfo_decl, get_pseudo_ti_init,
+       create_tinfo_types, emit_tinfo_decl): Likewise.
+       * search.c (lookup_base_r, lookup_base, lookup_field_1,
+       dfs_access_in_type, build_baselink, lookup_member,
+       adjust_result_of_qualified_name_lookup, copied_binfo): Likewise.
+       * semantics.c (perform_or_defer_access_check,
+       finish_non_static_data_member, finish_stmt_expr_expr,
+       finish_stmt_expr, finish_call_expr, finish_pseudo_destructor_expr,
+       finish_template_template_parm, finish_member_declaration,
+       emit_associated_thunks): Likewise.
+       * tree.c (build_target_expr_with_type, force_target_expr,
+       copy_binfo, get_first_fn, cp_tree_equal): Likewise.
+       * typeck.c (type_after_usual_arithmetic_conversions, comptypes,
+       cxx_sizeof_or_alignof_type, perform_integral_promotions,
+       build_class_member_access_expr, finish_class_member_access_expr,
+       build_ptrmemfunc_access_expr, build_unary_op,
+       unary_complex_lvalue, cxx_mark_addressable, build_modify_expr,
+       build_ptrmemfunc, expand_ptrmemfunc_cst, check_return_expr
+       * typeck2.c (complete_type_check_abstract,
+       abstract_virtuals_error, process_init_constructor,
+       add_exception_specifier): Likewise.
+
+2004-08-27  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * class.c (build_vtbl_initializer): Use ssize_int.
+       * decl.c (complete_array_type): Likewise.
+       * method.c (finish_thunk): Likewise.
+       * search.c (get_dynamic_base_type): Likewise.
+
+2004-08-26  Richard Henderson  <rth@redhat.com>
+
+       * cp-tree.h (DECL_FIELD_IS_BASE): New.
+       * class.c (build_base_field): Set it.
+       (build_simple_base_path): Use it.
+       (fixed_type_or_null): Don't consider base fields definitive.
+
+2004-08-25  Roger Sayle  <roger@eyesopen.com>
+
+       PR middle-end/16693
+       PR tree-optimization/16372
+       * decl.c (finish_enum): Make the precision of the enumerated type
+       the same width as the underlying integer type.
+
+2004-08-25  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/17155
+       * lex.c (build_lang_decl): Set DECL_NO_STATIC_CHAIN for all C++
+       functions.
+
+       * mangle.c (get_identifier_nocopy): Add cast.
+
+       * cp-tree.h (mangle_type): Remove.
+       * mangle.c (globals): GTY it.
+       (mangle_obstack): New variable.
+       (name_obstack): Likewise.
+       (name_base): Likewise.
+       (write_char): Adjust accordingly.
+       (write_chars): Likewise.
+       (write_string): Likewise.
+       (start_mangling): Initialize G.substitutions only one.  Add
+       ident_p parameter.
+       (finish_mangling): Use VARRAY_CLEAR to reclaim
+       storage in G.substitutions.  Use obstack_finish.
+       (init_mangle): Adjust for changes to variable names above.
+       Initialize G.substitutions.
+       (mangle_decl_string): Adjust call to start_mangling.
+       (get_identifier_nocopy): New function.
+       (mangle_decl): Use it.
+       (mangle_type_string): Adjust call to start_mangling.
+       (mangle_special_for_type): Likewise.
+       (mangle_vtt_for_type): Likewise.
+       (mangle_ctor_vtbl_for_type): Likewise.
+       (mangle_thunk): Likewise.
+       (mangle_guard_variable): Likewise.
+       (mangle_ref_init_variable): Likewise.
+
+2004-08-25  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/14428
+       * pt.c (redeclare_class_template): Check the type of non-type and
+       template template parameter.
+
+2004-08-25  Nathan Sidwell  <nathan@codesourcery.com>
+
+
+       * call.c (convert_class_to_reference): Adjust build_int_cst calls.
+       (build_user_type_conversion_1, convert_like_real,
+       build_java_interface_fn_ref, build_special_member_call): Likewise.
+       * class.c (finish_struct_1, build_vtbl_initializer): Likewise.
+       * cp-gimplify.c (cp_gimplify_expr): Likewise.
+       * cvt.c (cp_convert_to_pointer): Likewise.
+       * decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
+       * decl2.c (start_static_initialization_or_destruction,
+       generate_ctor_or_dtor_function): Likewise.
+       * except.c (build_throw): Likewise.
+       * mangle.c (write_integer_cst): Likewise.
+       * method.c (finish_thunk): Likewise.
+       * rtti.c (build_headof, get_tinfo_decl_dynamic,
+       build_dynamic_cast_1, ptr_initializer, ptm_initializer,
+       get_pseudo_ti_init): Likewise.
+       * search.c (get_dynamic_cast_base_type): Likewise.
+       
 2004-08-25  Zack Weinberg  <zack@codesourcery.com>
 
        * class.c, search.c: Remove references to DWARF_DEBUG.
 
        * repo.c (extract_string): Reset backquote after one character.
        (get_base_filename): Fix indentation.
-
 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>
 
-       * cp/decl.c (cxx_init_decl_processing): Adjust
+       * decl.c (cxx_init_decl_processing): Adjust
        build_common_tree_nodes call.
 
 2004-08-24  Nathan Sidwell  <nathan@codesourcery.com>