OSDN Git Service

PR c++/9400
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
index 3006cfd..94fb884 100644 (file)
@@ -1,3 +1,369 @@
+2003-03-06  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/9400
+       * decl.c (pushdecl): Don't check for shadowing of DECL_ARTIFICIAL
+       PARM_DECLs.
+
+       PR c++/9791
+       * class.c (get_basefndecls): Use lookup_fnfields_1.
+
+2003-03-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/9188
+       * parser.c (cp_parser_type_parameter): Remove redundant `expect'
+       in error message.
+       (cp_parser_single_declaration): Likewise.
+
+2003-03-05  Jason Merrill  <jason@redhat.com>
+
+       PR c++/9440
+       * call.c (build_conditional_expr): Use convert rather than an
+       explicit NOP_EXPR.
+
+2003-03-02  Matt Austern  <austern@apple.com>
+
+       * decl.c (cp_binding_level): Add static_decls varray member.
+       (add_decl_to_level): Add static/inline namespace scope
+       declarations to static_decls array.
+       (wrapup_global_for_namespace): Pass static_decls only, instead of
+       all decls, to wrapup_global_declarations/check_global_declarations.
+       (push_namespace): Initialize static_decls for ordinary namespaces.
+       (cxx_init_decl_processing): Initialize static_decls for global
+       namespace.
+       
+2003-03-05  Mark Mitchell  <mark@codesourcery.com>
+
+       * class.c (end_of_class): Correct thinko.
+
+2003-03-04  Nathanael Nerode  <neroden@gcc.gnu.org>
+
+       * config-lang.in: Replace ${libstdcxx_version} by its value.
+
+2003-03-04  Gabriel Dos Reis <gdr@integrable-solutions.net>
+
+        * cp-tree.h (cxx_saved_binding): Declare.
+        (struct saved_scope): Adjust type of field 'old_binding'.
+        * decl.c (cxx_saved_binding_make): New macro.
+        (struct cxx_saved_binding): Define.
+        (store_bindings): Adjust prototype.  Use cxx_saved_binding to save
+        C++ bindings. 
+        (maybe_push_to_top_level): Adjust local variable type.
+        (pop_from_top_level): Likewise.
+       
+2003-03-04  Tom Tromey  <tromey@redhat.com>
+
+       * Make-lang.in (c++.tags): New target.
+
+2003-03-04  Neil Booth  <neil@daikokuya.co.uk>
+
+       * Make-lang.in: Update.
+
+2003-03-03  Jason Merrill  <jason@redhat.com>
+
+       * decl.c (finish_enum): Do set the type in a template. Simplify.
+       * pt.c (tsubst_enum, tsubst_copy): Revert last patch.
+
+2003-03-03  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/9878
+       * call.c (convert_class_to_reference): Correct conversion
+       sequences.
+       (reference_binding): Add ref_bound_directly_to_rvalue_p parameter.
+       (implicit_conversion): Adjust call to reference_binding.
+       (add_candidate): Change type of candidates parameter.
+       (add_function_candidate): Likewise.
+       (add_conv_candidate): Likewise.
+       (build_builtin_candidate): Likewise.
+       (add_builtin_candidate): Likewise.
+       (add_builtin_candidates): Likewise.
+       (add_template_candidate_real): Likewise.
+       (add_template_candidate): Likewise.
+       (add_template_conv_candidate): Likewise.
+       (build_user_type_conversion_1): Adjust accordingly.
+       (build_object_call): Likewise.
+       (build_conditional_expr): Likewise.
+       (add_candidates): Likewise.
+       (build_new_op): Likewise.
+       (convert_like_real): Use USER_CONV_CAND.  Use build_nop.
+       (build_new_method_call): Adjust calls to add_function_candidate.
+       (make_temporary_var_for_ref_to_temp): New function.
+       (initialize_reference): Add decl parameter.
+       * class.c (build_rtti_vtbl_entries): Use build_address and
+       build_nop.
+       * cp-tree.h (initialize_reference): Change prototype.
+       (make_temporary_var_for_ref_to_temp): New function.
+       (build_type_conversion): Change prototype.
+       (build_address): New function.
+       (build_nop): Likewise.
+       * cvt.c (cp_convert_to_pointer): Adjust call to
+       build_type_conversion.  Avoid indicating redundant NOP_EXPRs.
+       Use build_nop.
+       (convert_to_pointer_force): Use build_nop.
+       (build_up_reference): Use make_temporary_var_for_ref_to_temp.
+       (convert_to_reference): Adjust call to build_type_conversion.
+       (ocp_convert): Likewise.
+       (build_type_conversion): Remove for_sure parameter.
+       * decl.c (grok_reference_init): Use initialize_reference.
+       * typeck.c (build_address): New function.
+       (build_nop): Likewise.
+       (build_unary_op): Use them.
+       (build_ptrmemfunc): Tidy slightly.
+       (convert_for_initialization): Adjust call to
+       initialize_reference.
+       * typeck2.c (store_init_value): Remove #if 0'd code.
+       
+2003-03-03  Jason Merrill  <jason@redhat.com>
+
+       * decl.c (start_function): Clear DECL_NUM_STMTS.
+
+       * class.c (get_vtable_decl): Use vtbl_type_node.
+       (build_primary_vtable): Check for it.
+
+2003-03-02  Aldy Hernandez  <aldyh@redhat.com>
+
+       * decl.c (check_initializer): Check for vector_opaque_p.
+
+2003-03-02  Ashif Harji  <asharji@uwaterloo.ca>
+
+       * lang-specs.h (default_compilers): Add -no-integrated-cpp flag to
+         invoke an external cpp during compilation.
+
+2003-03-01  Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+       * decl.c (duplicate_decls): Convert use of warning_with_decl() to
+       that of warning().
+       (start_decl): Likewise.
+       (start_function): Likewise.
+
+2003-03-01  Neil Booth  <neil@daikokuya.co.uk>
+
+       * Make-lang.in (CXX_C_OBJS): Update.
+
+2003-02-28  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/9892
+       * pt.c (instantiate_decl): Clear DECL_RTL for a VAR_DECL when
+       instantiating it.
+
+2003-02-28  Aldy Hernandez  <aldyh@redhat.com>
+
+        * parser.c (cp_parser_init_declarator): Revert opaque
+        vector_opaque_p change.
+        Do not include target.h.
+
+2003-02-28  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/9879
+       * cp-tree.h (build_zero_init): Add parameter.
+       * decl.c (cp_finish_decl): Adjust call.
+       * init.c (build_zero_init): Add nelts parameter.  Adjust recursive
+       calls.
+       (build_default_init): Add nelts parameter.  Adjust calls to
+       build_zero_init.
+       (build_new_1): Adjust call to build_default_init.
+       * typeck2.c (process_init_constructor): Adjust call to build_zero_init.
+       
+2003-02-26  Devang Patel  <dpatel@apple.com>
+
+       * decl.c (finish_enum): Merge two 'for' loops. Copy value node if required.
+       Postpone enum setting for template decls.
+       (build_enumerator): Delay copying value node until finish_enum (). Remove
+       #if 0'ed code.
+       * pt.c (tsubst_enum): Set TREE_TYPE and copy value node.
+       (tsubst_copy): Add check for enum type.
+       
+2003-02-25  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/9683
+       * decl2.c (prune_vars_needing_no_initialization): Do not throw
+       away initializations for DECL_EXTERNAL VAR_DECLs.
+       (finish_file): Adjust accordingly.
+       * pt.c (instantiate_decl): Do not defer VAR_DECLs.
+
+2003-02-24 Gabriel Dos Reis  <gdr@integrable-solutions.net>
+
+       * decl.c (add_binding): Time TV_NAME_LOOKUP.
+       (push_class_binding): Likewise.
+       (set_namespace_binding): Likewise.
+
+2003-02-24  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/9836
+       * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): Do not skip from
+       specializations back to the main template.
+       * parser.c (cp_parser_diagnose_invalid_type_name):Adjust use.
+       * pt.c (resolve_typename_type): Likewise.
+
+2003-02-24  Jeffrey D. Oldham  <oldham@codesourcery.com>
+
+       PR c++/9778
+       * pt.c (tsubst_copy_and_build): For a templated function inside a
+       scope, process template arguments.
+
+2003-02-24  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
+
+       PR c++/9602
+       * typeck2.c (abstract_virtuals_error): Don't check when
+       TYPE is still template parameter dependent.
+
+2003-02-23  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/5333
+       * cp-tree.h (CLASSTYPE_PRIMARY_TEMPLATE): New macro.
+       * parser.c (cp_parser_diagnose_invalid_type_name): Use it.
+       * pt.c (instantiate_class_template): Don't try to instantiate
+       dependent types.
+       (resolve_typename_type): Use CLASSTYPE_PRIMARY_TEMPLATE.
+       
+2003-02-21  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/9749
+       * decl.c (grokdeclarator): Do not allow parameters with variably
+       modified types.
+
+2003-02-21  Nathan Sidwell  <nathan@codesourcery.com>
+
+       * search.c (bfs_walk_grow): Remove. Fold into ...
+       (bfs_walk): ... here, fix fencepost error. Fix merge lossage
+       in previous patch.
+
+2003-02-20  Mark Mitchell  <mark@codesourcery.com>
+
+       PR c++/9729
+       * mangle.c (mangle_conv_op_name_for_type): Issue an error message
+       when the G++ 3.2 ABI prevents correct compilation.
+
+2003-02-20  Nathan Sidwell  <nathan@codesourcery.com>
+
+       Change base class access representation. Share virtual base
+       binfos.
+       * cp/call.c (build_special_member_call): Remove binfo_for_vbase
+       call.
+       * cp/class.c (build_base_path): Likewise.
+       (build_primary_vtable): Adjust BINFO_NEW_VTABLE_MARKED use.
+       (build_secondary_vtable): Remove FOR_TYPE arg. Adjust.
+       (make_new_vtable): Adjust.
+       (force_canonical_binfo_r): Delete.
+       (force_canonical_binfo): Delete.
+       (mark_primary_virtual_base): Delete.
+       (dfs_unshared_virtual_bases): Delete.
+       (mark_primary_bases): Adjust.
+       (maybe_warn_about_overly_private_class): Adjust.
+       (dfs_base_derived_from): Delete.
+       (base_derived_from): Follow the inheritance chain.
+       (struct find_final_overrider_data): Add vpath member.
+       (dfs_find_final_overrider): Adjust.
+       (dfs_find_final_overrider_q, dfs_find_final_overrider_post): New.
+       (find_final_overrider): Adjust.
+       (update_vtable_entry_for_fn): Adjust.
+       (modify_all_vtables): Adjust.
+       (walk_subobject_offsets): Adjust.
+       (layout_nonempty_base_or_field): Adjust.
+       (layout_empty_base): Remove last parameter. Adjust.
+       (build_base_field): Adjust.
+       (build_base_fields): Adjust.
+       (propagate_binfo_offsets): Remove last parameter. Adjust.
+       (dfs_set_offset_for_unshared_vbases): Delete.
+       (layout_virtual_bases): Adjust.
+       (finish_struct_1): Adjust.
+       (init_class_processing): Don't init access nodes.
+       (dfs_get_primary_binfo): Delete.
+       (get_primary_binfo): Adjust.
+       (dump_class_hierarchy_r): Remove most derived arg, add IGO
+       parameter. Adjust.
+       (dump_class_hierarchy): Adjust.
+       (finish_vtbls): Adjust.
+       (get_original_base): Delete.
+       (build_vtt_inits): Adjust.
+       (dfs_build_secondary_vptr_vtt_inits): Adjust.
+       (dfs_ctor_vtable_bases_queue_p): Adjust.
+       (build_ctor_vtbl_group): Adjust.
+       (dfs_accumulate_vtbl_inits): Adjust.
+       (build_vtbl_initializer): Adjust.
+       (build_vbase_offset_vtbl_entries): Adjust.
+       (add_vcall_offset_vtbl_entries_1): Adjust.
+       * cp/cp-tree.h (CPTI_ACCESS_*): Remove.
+       (access_*_node): Remove.
+       (CANONICAL_BINFO): Delete.
+       (BINFO_UNSHARED_MARKED): Remove.
+       (BINFO_MARKED): Set LANG_FLAG_0 directly.
+       (SET_BINFO_MARKED, CLEAR_BINFO_MARKED): Delete.
+       (BINFO_VTABLE_PATH_MARKED): Set LANG_FLAG_3 directly.
+       (SET_BINFO_VTABLE_PATH_MARKED, CLEAR_BINFO_VTABLE_PATH_MARKED):
+       Delete.
+       (BINFO_NEW_VTABLE_MARKED): Set LANG_FLAG_4 directly.
+       (SET_BINFO_NEW_VTABLE_MARKED): Adjust.
+       (SET_BINFO_PUSHDECLS_MARKED, CLEAR_BINFO_PUSHDECLS_MARKED):
+       Delete.
+       (BINFO_DEPENDENT_BASE_P): New.
+       (dfs_walk, dfs_walk_real): Queue function takes derived binfo and
+       index.
+       (markedp, unmarkedp): Adjust.
+       (dfs_unmarked_real_bases_queue_p, dfs_marked_real_bases_queue_p,
+       dfs_skip_vbases, marked_vtable_pathp, unmarked_vtable_pathp,
+       find_vbase_instance, binfo_for_vbase): Delete.
+       (copied_binfo, original_binfo): Declare.
+       (finish_base_specifier): Add virtual_p arg.
+       (unshare_base_binfos): Delete.
+       (copy_base_binfos): Declare.
+       (reverse_path): Delete.
+       * cp/decl.c (xref_basetypes): Access and virtuality passed
+       differently. Don't copy direct base binfos here. Call
+       copy_base_binfos.
+       * cp/init.c (dfs_initialize_vtbl_ptrs): Adjust.
+       (initialize_vtbl_ptrs): Adjust.
+       (expand_member_init): Adjust.
+       * cp/parser.c (cp_parser_base_specifier): Adjust.
+       * cp/pt.c (instantiate_class_template): Adjust.
+       (get_template_base_recursive): Adjust.
+       * cp/rtti.c (get_pseudo_ti_init): Adjust.
+       (get_pseudo_ti_desc): Adjust.
+       * cp/tree.c (unshare_base_binfos): Rename to ...
+       (copy_base_binfos): ... here, reimplement.
+       (make_binfo): Set BINFO_DEPENDENT_BASE_P.
+       (reverse_path): Remove.
+       * cp/typeck.c (get_delta_difference): Adjust error messages.
+       * cp/semantics.c (finish_base_specifier): Add virtual arg, adjust.
+       * cp/search.c (lookup_base_r): Adjust.
+       (dynamic_cast_base_recurse): Adjust.
+       (canonical_binfo): Remove.
+       (dfs_canonical_queue): Remove.
+       (dfs_assert_unmarked_p): Remove.
+       (assert_canonical_unmarked): Remove.
+       (shared_marked_p, shared_unmarked_p): Remove.
+       (BINFO_ACCESS, SET_BINFO_ACCESS): Use TREE_PUBLIC & TREE_PRIVATE.
+       (dfs_access_in_type): Adjust.
+       (access_in_type): Adjust.
+       (dfs_accessible_queue_p): Adjust.
+       (dfs_accessible_p): Adjust.
+       (is_subobject_of_p_1, is_subobject_of_p): Remove.
+       (struct lookup_field_info): Remove from_dep_base_p field.
+       (lookup_field_queue_p): Adjust, test BINFO_DEPENDENT_BASE_P.
+       (lookup_field_r): Remove dependent base code.
+       (lookup_member): Likewise.
+       (dfs_walk, dfs_walk_real): Add access arg to queue fn.
+       (dfs_unmarked_real_bases_queue_p): Remove.
+       (dfs_marked_real_bases_queue_p): Remove.
+       (dfs_skip_vbases): Remove.
+       (dfs_get_pure_virtuals): Adjust.
+       (markedp, unmarkedp): Adjust.
+       (marked_vtable_pathp, unmarked_vtable_pathp): Remove.
+       (marked_pushdecls_p, unmarked_pushdecls_p): Adjust.
+       (dfs_unmark): Adjust.
+       (dfs_get_vbase_types):Remove.
+       (dfs_build_inheritance_graph_order): Remove.
+       (get_vbase_types): Remove
+       (dfs_find_vbase_instance): Remove.
+       (find_vbase_instance): Remove.
+       (dfs_debug_unmarkedp): Adjust.
+       (dependent_base_p): Remove.
+       (dfs_push_type_decls): Adjust.
+       (dfs_push_decls): Adjust.
+       (dfs_no_overlap_yet): Adjust.
+       (copied_binfo): New function.
+       (original_binfo): New function.
+       (binfo_for_vbase): Remove.
+
 2003-02-18  Zack Weinberg  <zack@codesourcery.com>
 
        * cp/search.c (grow_bfs_bases): New subroutine of bfs_walk.
        PR c++/9623
        * decl.c (reshape_init): Don't mess with initializer labels.
 
+       PR c++/9485
+       * parser.c (cp_parser_postfix_expression): Set idk properly for
+       object->scope::member.
+
 2003-02-18  Ben Elliston  <bje@redhat.com>
 
        PR other/7350