OSDN Git Service

Mark pr last change.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index d8289b9..ba4fdbc 100644 (file)
@@ -1,3 +1,475 @@
+2002-08-30  Richard Henderson  <rth@redhat.com>
+
+       PR opt/7515
+       * tree.c: Include target.h.
+       (cp_cannot_inline_tree_fn): Don't auto-inline functions that
+       don't bind locally.
+       * Makefile.in (tree.o): Update.
+
+2002-08-27  Mark Mitchell  <mark@codesourcery.com>
+
+       * 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  <austern@apple.com>
+
+       * 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  <mark@codesourcery.com>
+
+       * typeck.c (build_class_member_access_expr): Handle COMPOUND_EXPR
+       and COND_EXPR specially; fix error message output.
+
+2002-08-22  Jason Merrill  <jason@redhat.com>
+
+       * pt.c (tsubst_expr): RETURN_EXPR is now RETURN_STMT_EXPR.
+       * semantics.c (nullify_returns_r): Likewise.
+
+2002-08-17  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+       Fix PR/7621
+       * typeck.c (finish_class_member_access_expr): Diagnose cases where
+       name lookup finds nothing.
+
+2002-08-15  Jason Merrill  <jason@redhat.com>
+
+       * 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  <aoliva@redhat.com>
+
+       * 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  <gdr@nerim.net>
+
+       Fix PR/7504
+       * parse.y (parse_finish_call_expr): Handle incomplete
+       type used to name a scope.
+
+2002-08-15  Nathan Sidwell  <nathan@codesourcery.com>
+
+       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  <mark@codesourcery.com>
+
+       * decl.c (pushdecl_class_level): Honor requests to bind names to
+       OVERLOADs.
+
+2002-08-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * 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  <gdr@nerim.net>
+
+       * decl.c (duplicate_decls): Replace DECL_SOURCE_FILE +
+       DECL_SOURCE_LINE with DECL_SOURCE_LOCATION.
+       * 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  <neil@daikokuya.co.uk>
+
+       * lang-specs.h: Remove -ansi.
+
+2002-08-10  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * tree.c (maybe_dummy_object): Replace // with /* */
+
+2002-08-09  Mark Mitchell  <mark@codesourcery.com>
+
+       * 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
+       adjust_result_of_qualified_name_lookup.
+       * 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  <mrs@apple.com>
+
+       * 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  <mark@codesourcery.com>
+
+       * typeck.c (build_class_member_access_expr): Do not return
+       error_mark_node when no error has occurred.
+
+2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * typeck.c (build_component_addr): Remove.
+       (build_unary_op): Just check it's not a bitfield, and then build
+       an ADDR_EXPR.
+
+2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * class.c (convert_to_base): Correct check for error_mark_node.
+       (create_vtable_ptr): Remove unused VFUNS_P parm.
+
+2002-08-08  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * cp/Make-lang.in (c++.mostlyclean): Remove coverage files.
+
+2002-08-07  Mark Mitchell  <mark@codesourcery.com>
+
+       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.
+       (BASELINK_FUNCTIONS): Likewise.
+       (BASELINK_ACCESS_BINFO): Likewise.
+       (BASELINK_OPTYPE): Likewise.
+       (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
+       finish_class_member_access_expr.
+       (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
+       destructors.
+       (build_throw): Use BASELINK_FUNCTIONS.
+       * init.c (perform_member_init): Use
+       build_class_member_access_expr.
+       (build_offset_ref): Handle BASELINKs.  Use
+       build_class_member_access_expr.
+       * 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
+       called.
+       * spew.c (identifier_type): Use BASELINK, not TREE_LIST.
+       * tree.c (really_overloaded_fn): Use OVL_CHAIN for OVERLOADs, not
+       TREE_CHAIN.
+       (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_ptrmemfunc_access_expr.
+       (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  <neil@daikokuya.co.uk>
+
+       * Make-lang.in (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  <gdr@nerim.net>
+
+       * typeck.c (build_x_unary_op): Handle pointer-to-member.
+
+2002-08-05  Geoffrey Keating  <geoffk@redhat.com>
+
+       * class.c: Don't include obstack.h.
+       (popclass):
+       * 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  <gdr@nerim.net>
+
+       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  <geoffk@redhat.com>
+
+       * 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  <nathan@codesourcery.com>
+
+       * 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  <nathan@codesourcery.com>
+
+       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  <mark@codesourcery.com>
+
+       * init.c (build_member_call): Use build_new_method_call, not
+       build_method_call.
+
+2002-08-02  Krister Walfridsson  <cato@df.lth.se>
+
+       * Make-lang.in (spew.o, lex.o, pt.o): Add path to parse.h dependencies.
+
+2002-08-02  Mark Mitchell  <mark@codesourcery.com>
+
+       * call.c (build_method_call): Issue a more helpful error message
+       about ambiguous method names.
+
+2002-08-02  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * tree.c (build_shared_int_cst): Make cache file scope, and
+       GTY it.
+
+2002-08-02  Jason Merrill  <jason@redhat.com>
+
+       * 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  <neil@daikokuya.co.uk>
+
+       * 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  <mark@codesourcery.com>
+
+       * 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
+       basetype_path.
+       (convert_class_to_reference): Adjust use of
+       add_function_candidate.
+       (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.
+       (BASELINK_OPTYPE): Likewise.
+       (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
+       CALL_EXPR.
+       (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
+       lookup_template_function.
+       (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  <Franz.Sirl-kernel@lauterbach.com>
+
+       * lang-specs.h: Remove __GXX_ABI_VERSION, moved to gcc.c.
+
+2002-07-30  Gabriel Dos Reis  <gdr@nerim.net>
+
+       * cp-tree.h (VF_DERIVED_VALUE): Restore from previous deletion.
+
+2002-07-30  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * cp-tree.h (CLASSTYPE_VFIELDS, VF_*, BV_*): Add more
+       documentation.
+
+2002-07-29  Alan Modra  <amodra@bigpond.net.au>
+
+       * cp-tree.h: Comment typo fix.
+
+2002-07-29  Richard Earnshaw  <rearnsha@arm.com>
+
+       * spew.c (space_for_token): Allocate zeroed memory for a new token
+       chunk.
+
+2002-07-27  Roger Sayle  <roger@eyesopen.com>
+
+       * decl.c (builtin_function_1): No need to explicitly mark
+       BUILT_IN_RETURN and BUILT_IN_EH_RETURN as noreturn.
+
+2002-07-27  Roger Sayle  <roger@eyesopen.com>
+
+       * decl2.c (cxx_decode_option): Support -fno-builtin-foo.
+
+2002-07-26  Jason Merrill  <jason@redhat.com>
+
+       * 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-lang.c (LANG_HOOKS_TREE_INLINING_CONVERT_PARM_FOR_INLINING):
+       Define.
+       * cp-tree.h: Declare new fns.
+
+2002-07-26  Neil Booth  <neil@daikokuya.co.uk>
+
+       * 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
+       names.
+
+2002-07-26  Jason Merrill  <jason@redhat.com>
+
+       * dump.c (cp_dump_tree): Call c_dump_tree.
+       * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
+
+2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
+
+       * error.c (print_whitespace): Remove.
+       * g++spec.c (LIBUNWIND): Move.
+       * mangle.c (mangled_position, write_signed_number): Remove.
+
+2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
+
+       * decl2.c (cxx_decode_option): Similarly.
+
 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
 
        * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
 
        PR c++/3797
        * decl.c (duplicate_decls): Don't propagate inlining parameters from
-       olddecl to newdecl when newdecl is a specialization of the 
+       olddecl to newdecl when newdecl is a specialization of the
        instantiation olddecl.
 
 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
 
        * pt.c (template_parm_this_level_p, push_template_decl_real):
-       Pass depth as int pointer. 
+       Pass depth as int pointer.
 
 2002-07-11  Tim Josling  <tej@melbpc.org.au>
 
-       Remove front end hard coding from gengtype.c.  
+       Remove front end hard coding from gengtype.c.
 
        * config-lang.in (gtfiles): Add files needed for this front end.
 
        * 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  <lerdsuwa@users.sourceforge.net>
 
        * pt.c (can_complete_type_without_circularity): Add static to
        (explicit_instantiation): Use it.
        * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
        and DECLSPECS.
-       
+
 2002-07-07  Roger Sayle  <roger@eyesopen.com>
 
        * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
        * typeck.c (build_object_ref): Adjust call to
        build_x_component_ref.
        (build_x_component_ref): Remove protect parameter.
-       
+
 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
 
        * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
        (really_overlaoded_fn): Likewise.
        (get_overloaded_fn): New function.'
        (get_first_fn): USe BASELINK_FUNCTIONS.
-       
+
 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
 
        * cp-tree.h (SCALAR_TYPE_P): New macro.
        * 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  <mark@codesourcery.com>
 
        * parse.y (parse_scoped_id): New function.
        * 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  <matt@3am-software.com>
 
        * decl.c (finish_function): Change "#ifdef VMS_TARGET" to