OSDN Git Service

PR C++/14865
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index d700297..f5d903c 100644 (file)
@@ -1,3 +1,406 @@
+2004-06-26  Jan Hubicka  <jh@suse.cz>
+
+       PR C++/14865
+       * decl2.c (maybe_emit_vtables):  Always import_export_vtable for the
+       reachability analysis.
+
+2004-06-25  Mark Mitchell  <mark@codesourcery.com>
+
+       * cp-mudflap.c (mflang_flush_calls): Fix thinkos resulting from
+       2004-06-23 change.
+
+2004-06-25  Paul Brook  <paul@codesourcery.com>
+
+       * decl2.c (get_guard): Call targetm.cxx.guard_type.
+       (get_guard_bits, get_guard_cond): Call targetm.cxx.guard_mask_bit.
+
+2004-06-24  Mark Mitchell  <mark@codesourcery.com>
+
+       * decl.c (grokdeclarator): Restore error messages about __thread.
+       * parser.c (cp_parser_decl_specifier_seq): Likewise.
+
+2004-06-24  Jason Merrill  <jason@redhat.com>
+
+       PR c++/16115
+       * decl.c (grokparms): Give the PARM_DECL reference type if the
+       parameter is passed by invisible reference.
+
+2004-06-24  Andreas Schwab  <schwab@suse.de>
+
+       * cp-tree.h (enum cp_storage_class): Remove trailing comma.
+
+2004-06-23  Mark Mitchell  <mark@codesourcery.com>
+
+       * Make-lang.in (cp/lex.o): Do not depend on cp/lex.h.
+       (cp/decl.o): Likewise.
+       (cp/decl2.o): Likewise.
+       (cp/pt.o): Likewise.
+       (cp/semantics.o): Likewise.
+       * config-lang.in (gtfiles): Do not reference cp/lex.h.
+       * class.c: Do not include lex.h.
+       (add_implicitly_declared_members): Do not use
+       adding_implicit_members.
+       (check_bases_and_members): Do not talk about grok_x_components.
+       * cp/cp-tree.h (adding_implicit_members): Remove.
+       (cp_storage_class): New type.
+       (cp_decl_spec): Likewise.
+       (cp_decl_specifier_seq): Likewise.
+       (cp_parameter_declarator): Use it for the decl_specifiers field.
+       (check_tag_decl): Adjust prototype.
+       (shadow_tag): Likewise.
+       (groktypename): Likewise.
+       (start_decl): Likewise.
+       (start_function): Likewise.
+       (start_method): Likewise.
+       (grok_x_components): Remove.
+       (grokfield): Adjust prototype.
+       (grokbitfield): Likewise.
+       (finish_member_class_template): Remove.
+       * decl.c: Do not include lex.h.
+       (adding_implicit_members): Do not define.
+       (check_tag_decl): Do not use trees to represent decl-specifiers.
+       (shadow_tag): Likewise.
+       (groktypename): Likewise.
+       (start_decl): Likewise.
+       (grokvardecl): Likewise.
+       (grokdeclarator): Likewise.
+       (grokparms): Likewise.
+       (start_function): Likewise.
+       (start_method): Likewise.
+       * decl.h (grokdeclarator): Adjust prototype.
+       * decl2.c: Do not include lex.h.
+       (grok_x_components): Remove.
+       (grokfield): Do not use trees to represent decl-specifiers.
+       (grokbitfield): Likewise.
+       * lex.c: Do not include lex.h.
+       * lex.h: Remove.
+       * parser.c: Include target.h.
+       (clear_decl_specs): New function.
+       (cp_parser_translation_unit): Do not use trees to represent
+       decl-specifiers.
+       (cp_parser_postfix_expression): Likewise.
+       (cp_parser_new_type_id): Likewise.
+       (cp_parser_condition): Likewise.
+       (cp_parser_simple_declaration): Likewise.
+       (cp_parser_decl_specifier_seq): Likewise.
+       (cp_parser_function_specifier_opt): Likewise.
+       (cp_parser_conversion_type_id): Likewise.
+       (cp_parser_template_parameter): Likewise.
+       (cp_parser_explicit_instantiation): Likewise.
+       (cp_parser_type_specifier): Likewise.
+       (cp_parser_simple_type_specifier): Likewise.
+       (cp_parser_init_declarator): Likewise.
+       (cp_parser_type_id): Likewise.
+       (cp_parser_type_specifier_seq): Likewise.
+       (cp_parser_parameter_declaration): Likewise.
+       (cp_parser_member_declaration): Likewise.
+       (cp_parser_exception_declaration): Likewise.
+       (cp_parser_function_definition_from_specifiers_and_declarator):
+       Likewise.
+       (cp_parser_single_declaration): Likewise.
+       (cp_parser_save_member_function_body): Likewise.
+       (cp_parser_friend_p): Likewise.
+       (cp_parser_set_storage_class): New function.
+       (cp_parser_set_decl_spec_type): Likewise.
+       * pt.c: Do not include lex.h.
+       * semantics.c: Likewise.
+       (finish_member_class_template): Remove. 
+       
+2004-06-23  Roger Sayle  <roger@eyesopen.com>
+
+       * call.c (build_cxx_call): Don't call expand_tree_builtin.  No
+       longer take both "args" and "convert_args" as arguments.
+       (build_op_delete_call): Update call to build_cxx_call.
+       (build_over_call): Likewise, update call to build_cxx_call.
+       * cp-tree.h (build_cxx_call): Update funtion prototype.
+       * typeck.c (build_function_call): Don't call expand_tree_builtin.
+       * rtti.c (throw_bad_cast): Update call to build_cxx_call.
+       (throw_bad_typeid): Likewise.
+       (build_dynamic_cast_1): Likewise.
+
+2004-06-22  Richard Henderson  <rth@redhat.com>
+
+       * class.c (build_vfn_ref): Take a pointer not object.  Build
+       an OBJ_TYPE_REF.
+       (cp_fold_obj_type_ref): New.
+       * call.c (build_over_call): Update build_vfn_ref call.
+       * cp-lang.c (LANG_HOOKS_FOLD_OBJ_TYPE_REF): New.
+       * cp-tree.h (cp_fold_obj_type_ref): Declare.
+
+2004-06-21  Jason Merrill  <jason@redhat.com>
+
+       PR c++/16112
+       * cp-gimplify.c (cp_gimplify_init_expr): Look through
+       CLEANUP_POINT_EXPR.
+
+2004-06-21  Mark Mitchell  <mark@codesourcery.com>
+
+       * cp-tree.def (NEW_EXPR): Add a fourth slot.
+       * cp-tree.h (PARMLIST_ELLIPSIS_P): Remove.
+       (TREE_PARMLIST): Likewise.
+       (CALL_DECLARATOR_PARMS): Likewise.
+       (CALL_DECLARATOR_QUALS): Likewise.
+       (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
+       (cp_declarator_kind): New type.
+       (cp_parameter_declarator): Likewise.
+       (cp_declarator): Likewise.
+       (cp_error_declarator): Likewise.
+       (no_parameters): Likewise.
+       (groktypename): Change prototype.
+       (start_decl): Likewise.
+       (start_handler_parms): Likewise.
+       (get_scope_of_declarator): Likewise.
+       (start_function): Likewise.
+       (start_preparsed_function): New function.
+       (start_function): Change prototype.
+       (start_method): Likewise.
+       (grokfield): Likewise.
+       (grokbitfield): Likewise.
+       (build_new): Likewise.
+       (make_pointer_declarator): Remove.
+       (make_reference_declarator): Likewise.
+       (make_call_declarator): Likewise.
+       (set_quals_and_spec): Likewise.
+       (process_template_parm): Change prototype.
+       (begin_function_definition): Remove.
+       (finish_parmlist): Remove.
+       * decl.c (groktypename): Do not use trees to represent
+       declarators.
+       (start_decl): Likewise.
+       (start_handler_parms): Remove.
+       (get_scope_of_declarator): Reimplement.
+       (grokdeclarator): Do not use trees to represent declarators.
+       (grokparms): Likewise.
+       (start_function): Likewise.
+       (start_method): Likewise.
+       (build_void_list_mode): Do not use TREE_PARMLIST.
+       * decl.h (grokdeclarator): Change prototype.
+       * decl2.c (grok_method_quals): Robustify.
+       (grok_x_components): Do not use trees to represent declarators.
+       (grokfield): Likewise.
+       (grokbitfield): Likewise.
+       (start_objects): Build FUNCTION_DECLs, not declarators.
+       (start_static_storage_duration_function): Likewise.
+       * init.c (build_new): Simplify.
+       * lex.c (make_pointer_declarator): Remove.
+       (make_reference_declarator): Likewise.
+       (make_call_declarator): Likewise.
+       (set_quals_and_spec): Likewise.
+       * method.c (use_thunk): Use start_preparsed_function.
+       (synthesize_method): Likewise.
+       (implicitly_declare_fn): Build FUNCTION_DECLs, not declarators.
+       * optimize.c (maybe_clone_body): Use start_preparsed_function.
+       * parser.c (cp_error_declarator): New variable.
+       (declarator_obstack): Likewise.
+       (alloc_declarator): New function.
+       (make_declarator): Likewise.
+       (make_id_declarator): Likewise.
+       (make_pointer_declarator): Likewise.
+       (make_reference_declarator): Likewise.
+       (make_ptrmem_declarator): Likewise.
+       (make_call_declarator): Likewise.
+       (make_array_declarator): Likewise.
+       (no_parameters): New variable.
+       (make_parameter_declarator): Likewise.
+       (cp_parser_check_for_definition_in_return_type): Do not use trees
+       to represent declarators.
+       (cp_parser_translation_unit): Likewise.
+       (cp_parser_new_expression): Likewise.
+       (cp_parser_new_type_id): Likewise.
+       (cp_parser_new_declarator_opt): Likewise.
+       (cp_parser_direct_new_declarator): Likewise.
+       (cp_parser_condition): Likewise.
+       (cp_parser_declaration_statement): Likewise.
+       (cp_parser_declaration): Likewise.
+       (cp_parser_conversion_type_id): Likewise.
+       (cp_parser_conversion_declarator_opt): Likewise.
+       (cp_parser_template_parameter_list): Likewise.
+       (cp_parser_template_parameter): Likewise.
+       (cp_parser_explicit_instantiation): Likewise.
+       (cp_parser_init_declarator): Likewise.
+       (cp_parser_declarator): Likewise.
+       (cp_parser_direct_declarator): Likewise.
+       (cp_parser_type_id): Likewise.
+       (cp_parser_parameter_declaration_clause): Likewise.
+       (cp_parser_parameter_declaration_list): Likewise.
+       (cp_parser_parameter_declaration): Likewise.
+       (cp_parser_member_declaration): Likewise.
+       (cp_parser_exception_declaration): Likewise.
+       (cp_parser_check_declarator_template_parameters): Likewise.
+       (cp_parser_function_definition_from_specifiers_and_declarator):
+       Likewise.
+       (cp_parser_save_member_function_body): Likewise.
+       * pt.c (process_template_parm): Add is_non_type parameter.
+       (convert_template_argument): Adjust call to groktypename.
+       (tsubst_call_declarator_parms): Remove use of TREE_PARMLIST.
+       (tsubst): Do not expect declarators.
+       (tsubst_copy_and_build): Adjust NEW_EXPR case to handle additional
+       argument.
+       (instantiate_decl): Use start_preparsed_function.
+       * semantics.c (begin_function_definition): Remove.
+       (finish_parmlist): Remove.
+       * cp-mudflap.c (mflang_flush_calls): Build FUNCTION_DECLs, not
+       declarators.
+
+2004-06-21  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * call.c (build_vfield_ref): Add new operand for COMPONENT_REF.
+       (build_new_method_call): Likewise.
+       * decl.c (local_variable_p_walkfn): Don't walk into types.
+       * decl2.c (grok_array_decl): Add new operands for ARRAY_REF.
+       (build_anon_union_vars): Add new operand for COMPONENT_REF.
+       * init.c (buld_new): Add new operand for ARRAY_REF.
+       * method.c (do_build_copy_constructor): New op for COMPONENT_REF.
+       (do_build_assign_ref): Likewise.
+       * parser.c (cp_parser_direct_new_declarator): Add new operands
+       for ARRAY_REF.
+       (cp_parser_direct_declarator): Likewise.
+       * pt.c (tsubst): Likewise.
+       (tsubst_copy, tsubst_copy_and_build): Likewise; also add new operand
+       for COMPONENT_REF.
+       * semantics.c (finish_non_static_data_member): Add new operand
+       for COMPONENT_REF.
+       * typeck.c (build_class_member_access_expr): Likewise.
+       (build_class_member_access_expr, finish_class_member_access_expr):
+       Likewise.
+       (build_ptrmemfunc_access_expr): Likewise.
+       (build_array_ref): Add new operands for ARRAY_REF.
+       * typeck2.c (split_nonconstant_init_1): Likewise; COMPONENT_REF too.
+       * tree.c (count_trees_r, no_linkage_helper): Don't walk in types.
+
+2004-06-21  Richard Henderson  <rth@redhat.com>
+
+       * dump.c (cp_dump_tree): Don't use dump_next_stmt.
+       * parser.c (cp_parser_jump_statement): Update commentary.
+       * pt.c (tsubst_expr): Use RETURN_EXPR.
+       * semantics.c (finish_return_stmt): Likewise.
+       (finalize_nrv_r): Likewise.
+       * typeck.c, typeck2.c: Update file start commentary.
+
+2004-06-21  Richard Henderson  <rth@redhat.com>
+
+       * semantics.c (finish_expr_stmt): Call verify_sequence_points.
+
+2004-06-20  Richard Henderson  <rth@redhat.com>
+
+       * cp-tree.h (add_decl_stmt): Declare.
+       * pt.c (tsubst_copy): Abort for CLEANUP_POINT_EXPR.
+       * semantics.c (maybe_cleanup_point_expr): New.
+       (add_decl_stmt, finish_expr_stmt, finish_return_stmt,
+       finish_for_expr, finish_switch_cond): Use it.
+       (finalize_nrv_r): Don't build an EXPR_STMT.  Don't frob TREE_CHAIN.
+
+2004-06-20  Richard Henderson  <rth@redhat.com>
+
+       * cp-tree.def (CLEANUP_STMT, IF_STMT): Move from c-common.def.
+       * cp-gimplify.c (gimplify_if_stmt): Move from c-gimplify.c.
+       (cp_gimplify_expr): Call it.
+       (gimplify_cleanup_stmt): Move from c-gimplify.c.
+       (cp_genericize): New.
+       * decl.c (finish_function): Call it.
+       * cp-tree.h (cp_stmt_codes): Add CLEANUP_STMT, IF_STMT.
+       (CLEANUP_BODY, CLEANUP_EXPR, CLEANUP_DECL): Move from c-common.h.
+       (IF_COND, THEN_CLAUSE, ELSE_CLAUSE): Likewise.
+       (cp_genericize): Declare.
+       * cxx-pretty-print.c (pp_cxx_statement): Add CLEANUP_STMT, IF_STMT.
+       * dump.c (cp_dump_tree): Likewise.
+       * semantics.c (push_cleanup): Move from c-semantics.c.
+
+2004-06-20  Zack Weinberg  <zack@codesourcery.com>
+
+       * cp-lang.c (has_c_linkage): Implement.
+
+       * cp-tree.h (set_mangled_name_for_decl): Don't prototype.
+       * decl.c (duplicate_decls): Use COPY_DECL_RTL.
+       (builtin_function_1): Don't call make_decl_rtl.
+       (build_cp_library_fn): Don't call set_mangled_name_for_decl.
+       (grokvardecl): Don't call mangle_decl.
+       * except.c (nothrow_libfn_p): Look at DECL_NAME, not
+       DECL_ASSEMBLER_NAME.
+       * method.c (set_mangled_name_for_decl): Delete.
+       * name-lookup.c (pushdecl): When a local extern shadows a
+       file-scope declaration of the same object, give both DECLs the
+       same DECL_UID.
+       * typeck.c (cxx_mark_addressable): Don't set TREE_ADDRESSABLE
+       on DECL_ASSEMBLER_NAME.
+
+2004-06-19  Richard Henderson  <rth@redhat.com>
+
+       * cp-gimplify.c: Remove unnecessary prototypes.
+       (cp_gimplify_stmt): Merge into ...
+       (cp_gimplify_expr): ... here.  Move to end of file.  Handle
+       stmts_are_full_exprs_p frobbing.
+       * cp-tree.h (cp_gimplify_stmt): Remove.
+       * pt.c (tsubst_expr): Merge prep_stmt and unify.
+       * tree.c (init_tree): Don't set lang_gimplify_stmt.
+
+2004-06-18  Richard Henderson  <rth@redhat.com>
+
+       PR c++/16034
+       * semantics.c (begin_cond): New.
+       (finish_cond): Rewrite to handle template DECL_STMTs specially.
+       Assume that non-template decls go land before the conditional.
+       (simplify_loop_decl_cond): Likewise.
+       (begin_if_stmt, finish_if_stmt_cond, begin_while_stmt,
+       finish_while_stmt_cond, finish_for_init_stmt, finish_for_cond,
+       begin_switch_stmt, finish_switch_cond): Update to match.
+
+2004-06-17  Jason Merrill  <jason@redhat.com>
+
+       PR c++/16015
+       * semantics.c (simplify_aggr_init_expr): Don't return the slot.
+       (finish_stmt_expr_expr): Update type after conversions.
+       (finish_stmt_expr): Wrap initializer in CLEANUP_POINT_EXPR.
+       Handle void initializer.
+       * tree.c (build_cplus_new): Make AGGR_INIT_EXPRs void.
+
+2004-06-17  Geoffrey Keating  <geoffk@apple.com>
+
+       * class.c (build_clone): Don't call defer_fn, let mark_used do it.
+       * cp-tree.h (defer_fn): Delete.
+       * decl2.c (defer_fn): Delete.
+       (finish_file): Simplify deferred_fns loops; check that
+       only used inline functions get into deferred_fns.
+       (mark_used): Inline previous contents of defer_fn.
+
+2004-06-16  Richard Henderson  <rth@redhat.com>
+
+       * cp-tree.h (COMPOUND_STMT_TRY_BLOCK, COMPOUND_STMT_BODY_BLOCK): Kill.
+       (BIND_EXPR_TRY_BLOCK, BIND_EXPR_BODY_BLOCK): New.
+       * cxx-pretty-print.c (pp_cxx_function_definition): Move handling
+       of CTOR_INITIALIZER ...
+       (pp_cxx_statement): ... here.
+       * decl.c (begin_function_body): Don't set COMPOUND_STMT_BODY_BLOCK.
+       (finish_function): Use alloc_stmt_list to zap entire function.
+       * parser.c (cp_parser_compound_statement): Update commentary.
+       * pt.c (tsubst_expr): Use BIND_EXPR instead of COMPOUND_STMT.
+       * semantics.c (begin_compound_stmt, finish_compound_stmt): Likewise.
+       (finish_stmt_expr): Don't look through COMPOUND_STMT.
+
+2004-06-16  Geoffrey Keating  <geoffk@apple.com>
+
+       * pt.c (mark_decl_instantiated): Don't call defer_fn.
+
+2004-06-16  Richard Henderson  <rth@redhat.com>
+
+       * parser.c (cp_parser_labeled_statement): Update commentary.
+       * pt.c (tsubst_expr): Use CASE_LABEL_EXPR.
+       * tree.c (mark_local_for_remap_r): Likewise.
+
+2004-06-16  Richard Henderson  <rth@redhat.com>
+
+       * parser.c (cp_parser_asm_definition): Update commentary.
+       * pt.c (tsubst_expr): Use ASM_EXPR.
+       * semantics.c (finish_asm_stmt): Likewise.
+
+2004-06-16  Richard Henderson  <rth@redhat.com>
+
+       * decl.c (finish_destructor_body): Use LABEL_EXPR.
+       * parser.c (cp_parser_statement): Update commentary.
+       * pt.c (tsubst_expr): Use LABEL_EXPR, GOTO_EXPR.
+       * semantics.c (finish_goto_stmt, finish_label_stmt): Likewise.
+       * tree.c (mark_local_for_remap_r): Likewise.
+
 2004-06-16  Richard Henderson  <rth@redhat.com>
 
        PR c++/16012
                * cp-tree.h: Fix typo.
 
                * cp-tree.h: Include cgraph.h
-               (DECL_NEEDED_P): Use cgraph_*node on the decl instead of 
+               (DECL_NEEDED_P): Use cgraph_*node on the decl instead of
                TREE_SYMBOL_REFERENCED on the DECL_ASSEMBLER_NAME of the decl.
 
 2004-06-12  Jason Merrill  <jason@redhat.com>
 
        PR c++/15554
        * pt.c (tsubst_copy): Do not try to substitute for an enumeration
-       constant in a non-dependent context. 
-       
+       constant in a non-dependent context.
+
        PR c++/15057
        * except.c (build_throw): Ensure that temp_expr has been
        initialized.
        * decl2.c (maybe_emit_vtables): If TARGET_WEAK_NOT_IN_ARCHIVE_TOC
        is nonzero, and if we see a noninline definition of a key method,
        make the vtables nonweak.
-       
+
 2004-06-02  Matt Austern  <austern@apple.com>
 
        * cp-tree.h (instantiate_decl): new boolean parameter,
        change it to an implicit instantiation.
        (instantiate_pending_templates): Add new argument to instantiate_decl.
        * tree.c (cp_cannot_inline_tree_fn): Likewise.
-       
+
 2004-06-02  Andrew Pinski  <pinskia@physics.uc.edu>
 
        * cp-tree.h: Fix typo.
        * typeck.c (require_complete_type): Return error_mark_node if
        value's type is an error_mark_node.
 
-2005-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
+2004-05-20  Andrew Pinski  <pinskia@physics.uc.edu>
 
        * optimize.c (calls_setjmp_r): Remove.
        (calls_setjmp_p): Remove.
 
        * rtti.c: Update copyright.
 
-2003-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
+2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
 
        PR c++/14033
        * decl.c (require_complete_types_for_parms): Do not insert
        error_mark_node in the parameter list.
 
-2003-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
+2004-02-06  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
 
        PR c++/14028
        * parser.c (cp_parser_enclosed_template_argument_list): Emit straight
        * tree.c (cp_cannot_inline_tree_fn):  Allow inlining of comdat
        functions.
 
-2003-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
+2004-02-05  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
 
        PR c++/14008
        * parser.c (cp_parser_diagnose_invalid_typename): Removed parsing
        * method.c (use_thunk): Set CALL_FROM_THUNK on the call to the
        actual function.
 
-2003-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
+2004-02-04  Giovanni Bajo  <giovannibajo@gcc.gnu.org>
 
        PR c++/13997
        * pt.c (more_specialized_class): Increase processing_template_decl
        PR c++/13474
        * pt.c (tsubst) <INTEGER_TYPE>: Remove obsolete array index tweaking.
 
-2003-01-12  Steven Bosscher  <stevenb@suse.de>
+2004-01-12  Steven Bosscher  <stevenb@suse.de>
 
        PR c++/13558
        * parser.c (cp_parser_member_declaration): Any non-type is also