aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
AgeCommit message (Collapse)AuthorFilesLines
2001-02-18invoke.texi (-fsquangle): Remove documentation.Mark Mitchell1-4/+2
* invoke.texi (-fsquangle): Remove documentation. (-fname-mangling-version): Likewise. * cp-tree.h (new_abi_rtti_p): Remove. (name_mangling_version): Likewise. (flag_do_squangling): Likewise. * class.c (build_rtti_vtbl_entries): Remove old ABI support. * decl.c (grokfndecl): Likewise. * decl2.c (name_mangling_version): Remove. (flag_do_squangling): Likewise. (lang_f_options): Remove `squangle'. (unsupported_options): Add `squangle'. (cxx_decode_option): Issue a warning about uses of -fname-mangling-version. (finish_file): Remove old ABI support. * pt.c (check_explicit_specialization): Likewise. (tsubst_decl): Likewise. * rtti.c (init_rtti_processing): Likewise. (build_headof): Likewise. (get_tinfo_decl_dynamic): Likewise. (tinfo_from_decl): Likewise. (build_dynamic_cast_1): Likewise. (synthesize_tinfo_var): Likewise. * init.c (build_new): Allow enumeration types for the array-bounds in a direct-new-declarator. From-SVN: r39845
2001-02-18Do put the VTT parameter in DECL_ARGUMENTS.Jason Merrill1-0/+11
* cp-tree.h (struct cp_language_function): Add x_vtt_parm. (current_vtt_parm): New macro. (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm. (DECL_HAS_VTT_PARM_P): New macro. (DECL_VTT_PARM): Remove. (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros. * decl.c (duplicate_decls): Only copy the operator code if appropriate. (start_function): Set current_vtt_parm. (lang_mark_tree): Don't mark vtt_parm. * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P. * class.c (build_clone): Maybe remove the VTT parm. * optimize.c (maybe_clone_body): Set up the VTT parm. * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm. * call.c (build_over_call): Just allow the VTT arg. * method.c (make_thunk): Don't set DECL_VTT_PARM. (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM. (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE. * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise. * error.c (dump_function_decl): Likewise. * call.c (build_user_type_conversion_1, convert_like_real): Abort if we try to call a constructor with in-charge or VTT parms. * method.c (skip_artificial_parms_for): New fn. * call.c (add_function_candidate, build_over_call): Call it. * call.c (build_new_method_call): Use current_vtt_parm. * init.c (expand_virtual_init): Likewise. * class.c (same_signature_p): No longer static. * cp-tree.h: Declare it. * search.c (look_for_overrides_r): Use it. From-SVN: r39841
2001-02-18pt.c (check_explicit_specialization): Copy TREE_PRIVATE and TREE_PROTECTED ↵Mark Mitchell1-0/+5
from the template being specialized. * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and TREE_PROTECTED from the template being specialized. From-SVN: r39813
2001-02-16pt.c (push_template_decl_real): Don't remangle the name of a class template.Mark Mitchell1-1/+3
* pt.c (push_template_decl_real): Don't remangle the name of a class template. From-SVN: r39752
2001-02-14pt.c (unify): Don't check cv quals of array types.Nathan Sidwell1-0/+4
cp: * pt.c (unify): Don't check cv quals of array types. testsuite: * g++.old-deja/g++.pt/deduct6.C: New test. From-SVN: r39666
2001-02-12pt.c (maybe_adjust_types_for_deduction, [...]): Remove spurious information ↵Nathan Sidwell1-18/+4
in comment. cp: * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case): Remove spurious information in comment. Allow further adjustments of REFERENCE_TYPE args. testsuite: * g++.old-deja/g++.pt/spec40.C: New test. From-SVN: r39604
2001-02-12Remove old ABI support.Mark Mitchell1-103/+7
From-SVN: r39599
2001-02-08search.c (shared_member_p): New function.Jason Merrill1-15/+40
* search.c (shared_member_p): New function. (lookup_field_r): Use it. * cp-tree.h (SHARED_MEMBER_P): Remove. * method.c (process_overload_item): Handle template-dependent array bounds. * pt.c (type_unification_real): If we end up with undeduced nontype parms, try again. * decl.c (lookup_name_real): Tweak warning to refer to decls, not types. * typeck2.c (friendly_abort): Don't say anything if we have earlier errors or sorries. * decl.c (check_tag_decl): Notice attempts to redefine bool and wchar_t. Ignore if in_system_header. * decl.c (maybe_push_cleanup_level): New fn... (start_decl_1): ...split out from here. * cvt.c (build_up_reference): Use it. * cp-tree.h: Declare it. From-SVN: r39540
2001-02-06pt.c (lookup_template_class): Make sure it's a primary template or ↵Nathan Sidwell1-1/+7
template_template_parm when... cp: * pt.c (lookup_template_class): Make sure it's a primary template or template_template_parm when called from the parser. (instantiate_template_class): Add assertion. testsuite: * g++.old-deja/g++.pt/spec39.C: New test. From-SVN: r39488
2001-01-29tree.c, tree.h (build_parse_node): Remove; was identical to build_nt.Joseph Myers1-2/+2
* tree.c, tree.h (build_parse_node): Remove; was identical to build_nt. * c-lang.c (start_cdtor), objc/objc-act.c (build_module_descriptor): Use build_nt instead of build_parse_node. cp: * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator, make_reference_declarator, make_call_declarator), method.c (implicitly_declare_fn), parse.y (namespace_using_decl, notype_unqualified_id, expr_or_declarator, new_type_id, after_type_declarator, direct_after_type_declarator, notype_declarator, complex_notype_declarator, complex_direct_notype_declarator, qualified_id, notype_qualified_id, overqualified_id, direct_new_declarator, absdcl, direct_abstract_declarator, conversion_declarator), pt.c (tsubst), semantics.c (begin_constructor_declarator): Use build_nt instead of build_parse_node. From-SVN: r39332
2001-01-28configure.in: Arrange to include defaults.h in [ht]config.h/tm.h.Kaveh R. Ghazi1-2/+0
* configure.in: Arrange to include defaults.h in [ht]config.h/tm.h. * Makefile.in: Remove all dependencies on defaults.h. * builtins.c: Don't include defaults.h. * c-common.c: Likewise. * c-decl.c: Likewise. * c-pragma.c: Likewise. * c-typeck.c: Likewise. * combine.c: Likewise. * i386.c: Likewise. * frame-ia64.c: Likewise. * cppexp.c: Likewise. * crtstuff.c: Likewise. * dbxout.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * except.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * frame-dwarf2.c: Likewise. * libgcc2.c: Likewise. * optabs.c: Likewise. * profile.c: Likewise. * sdbout.c: Likewise. * toplev.c: Likewise. * tradcif.y: Likewise. * tree.c: Likewise. * varasm.c: Likewise. ch: * Makefile.in: Remove all dependencies on defaults.h. * decl.c: Don't include defaults.h. * timing.c: Likewise. cp: * Make-lang.in: Remove all dependencies on defaults.h. * call.c: Don't include defaults.h. * decl.c: Likewise. * decl2.c: Likewise. * except.c: Likewise. * pt.c: Likewise. * rtti.c: Likewise. * tree.c: Likewise. * typeck.c: Likewise. f: * Make-lang.in: Remove all dependencies on defaults.h. * com.c: Don't include defaults.h. java: * Make-lang.in: Remove all dependencies on defaults.h. * decl.c: Don't include defaults.h. * expr.c: Likewise. * parse.y: Likewise. From-SVN: r39308
2001-01-24pt.c (tsubst_decl): Remove IN_DECL parameter.Nathan Sidwell1-6/+15
cp: * pt.c (tsubst_decl): Remove IN_DECL parameter. (tsubst_arg_types): Check parameter is not void. (tsubst): Adjust tsubst_decl call. testsuite: * g++.old-deja/g++.pt/spec38.C: New test. From-SVN: r39234
2001-01-24pt.c (check_explicit_specialization): Clone constructors and destructors.Kriang Lerdsuwanakij1-0/+5
* pt.c (check_explicit_specialization): Clone constructors and destructors. * g++.old-deja/g++.pt/spec33.C: Change from "Build don't link" to "Build don't run". From-SVN: r39229
2001-01-22cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.Nathan Sidwell1-42/+100
cp: * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER. (more_specialized): Add deduction parameter. * call.c (joust): Adjust more_specialized call. * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL, UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags. (get_bindings_order): Remove. (get_bindings_real): Add DEDUCE parameter. (maybe_adjust_types_for_deduction): Return extra unify flags. Do REFERENCE_TYPE jig for DEDUCE_ORDER. (type_unification_real): Deal with DEDUCE_ORDER. Use result of maybe_adjust_types_for_deduction. (more_specialized): Add DEDUCE parameter. Call get_bindings_real directly. (try_one_overload): Use result of maybe_adjust_types_for_deduction. (check_cv_quals_for_unify): Use new unify qualifier flags. (unify): Clear new unify qualifier flags. (get_bindings_real): Add DEDUCE parameter. (get_bindings): Adjust call to get_bindings_real. (get_bindings_overload): Likewise. (most_specialized_instantiation): Adjust call to more_specialized. testsuite: * g++.old-deja/g++.martin/sts_partial.C: Remove XFAIL. * g++.old-deja/g++.pt/spec35.C: New test. * g++.old-deja/g++.pt/spec36.C: New test. From-SVN: r39182
2001-01-19cp-tree.h (lookup_template_class): Add complain parm.Nathan Sidwell1-10/+21
cp: * cp-tree.h (lookup_template_class): Add complain parm. * decl.c (lookup_namespace_name): Adjust call to lookup_template_class. (make_typename_type): Likewise. * semantics.c (finish_template_type): Likewise. * pt.c (lookup_template_class): Add complain parm. Adjust. (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class. (tsubst): Likewise. testsuite: * g++.old-deja/g++.pt/deduct3.C: New test. From-SVN: r39129
2001-01-19pt.c (copy_default_args_to_explicit_spec): Preserve object's CV quals.Nathan Sidwell1-21/+26
cp: * pt.c (copy_default_args_to_explicit_spec): Preserve object's CV quals. Reorganize. testsuite: * g++.old-deja/g++.pt/spec34.C: New test. From-SVN: r39127
2001-01-18pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.Nathan Sidwell1-19/+28
cp: * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag. (type_unification_real): Set it. (unify): Use it. testsuite: * g++.old-deja/g++.pt/unify8.C: New test. From-SVN: r39115
2001-01-15pt.c (check_nontype_parm): Rename to ...Nathan Sidwell1-4/+4
* pt.c (check_nontype_parm): Rename to ... (invalid_nontype_parm_type_p): ... here. (process_template_parm): Adjust. (convert_template_argument): Adjust. From-SVN: r39040
2001-01-15pt.c (check_nontype_parm): New function.Nathan Sidwell1-22/+39
cp: * pt.c (check_nontype_parm): New function. (process_template_parm): Use it. (convert_template_argument): Use it. (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to member. testsuite: * g++.old-deja/g++.pt/nontype5.C: New test. From-SVN: r39034
2001-01-11pt.c (unify): Check array has a domain, before checking whether it is ↵Nathan Sidwell1-0/+1
variable sized. cp: * pt.c (unify): Check array has a domain, before checking whether it is variable sized. testsuite: * g++.old-deja/g++.pt/crash64.C: New test. From-SVN: r38902
2001-01-11pt.c (copy_default_args_to_explicit_spec_1): New function.Mark Mitchell1-25/+111
* pt.c (copy_default_args_to_explicit_spec_1): New function. (copy_default_args_to_explicit_spec): Likewise. (check_explicit_specialization): Use it. From-SVN: r38893
2001-01-11c-common.h (CTI_VOID_LIST): Remove.Mark Mitchell1-2/+7
* c-common.h (CTI_VOID_LIST): Remove. (void_list_node): Likewise. * tree.h (TI_VOID_LIST_NODE): New enumeral. (void_list_node): New macro. * config/arm/arm.c (arm_init_builtins): Use void_list_node. * config/i386/i386.c (ix86_init_builtins): Likewise. * config/ia64a/ia64.c (ia64_init_builtins): Likewise. * class.c (finish_struct_1): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. * decl.c (builtin_function): Likewise. (build_cp_library_fn): Likewise. (check_initializer): Likewise. (make_rtl_for_nonlocal_decl): Likewise. (cp_finish_decl): Likewise. (start_function): Likewise. * decl2.c (finish_anon_union): Likewise. * friend.c (do_friend): Likewise. * init.c (build_java_class_ref): Likewise. * method.c (make_thunk): Likewise. * pt.c (tsubst_friend_function): Likewise. * semantics.c (expand_body): Likewise. From-SVN: r38887
2001-01-10output.h (make_function_rtl): Remove prototype.Mark Mitchell1-2/+2
* output.h (make_function_rtl): Remove prototype. (make_decl_rtl): Likewise. * varasm.c (make_function_rtl): Remove. (make_decl_rtl): Determine top-levelness from DECL_CONTEXT, rather than from a third parameter. * tree.h (make_decl_rtl): Remove last parameter. * c-decl.c (builtin_function): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. (start_function): Likewise. * except.c (call_get_eh_context): Likewise. * expr.c (emit_block_move): Likewise. (clear_storage): Likewise. * profile.c (output_func_start_profiler): Likewise. * toplev.c (rest_of_decl_compilation): Likewise. * objc/objc-act.c (create_builtin_decl): Likewise. (synth_module_prologue): Likewise. (generate_static_reference): Likewise. (build_selector_reference_decl): Likewise. (build_class_reference_decl): Likewise. (build_objc_string_decl): Likewise. (build_protocol_reference): Likewise. * class.c (finish_struct_1): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. * decl.c (builtin_function): Likewise. (build_cp_library_fn): Likewise. (check_initializer): Likewise. (make_rtl_for_nonlocal_decl): Likewise. (cp_finish_decl): Likewise. (start_function): Likewise. * decl2.c (finish_anon_union): Likewise. * friend.c (do_friend): Likewise. * init.c (build_java_class_ref): Likewise. * method.c (make_thunk): Likewise. * pt.c (tsubst_friend_function): Likewise. * semantics.c (expand_body): Likewise. * com.c (ffecom_init_zero_): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. (ffecom_lookup_label_): Likewise. (builtin_function): Likewise. (start_function): Likewise. * class.c (build_utf8_ref): Remove last argument in call to make_decl_rtl; use make_function_rtl instead of make_decl_rtl. (build_class_ref): Likewise. (build_static_field_ref): Likewise. (get_dispatch_table): Likewise. (layout_class_method): Likewise. (emit_register_classes): Likewise. * constants.c (build_constant_data_ref): Likewise. * decl.c (builtin_function): Likewise. (create_primitive_vtable): Likewise. * expr.c (build_known_method_def): Likewise. (build_jni_stub): Likewise. (java_lang_expand_expr): Likewise. From-SVN: r38884
2001-01-08cp-tree.h (lang_decl_flags): Rename defined_in_class to initialized_in_class.Nathan Sidwell1-11/+8
cp: * cp-tree.h (lang_decl_flags): Rename defined_in_class to initialized_in_class. (DECL_DEFINED_IN_CLASS_P): Rename to ... (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning. * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P. (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P. * pt.c (check_default_tmpl_args): Adjust for DECL_INITIALIZED_IN_CLASS_P. (instantiate_class_template): Likewise. (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P. * class.c (finish_struct): Constify saved_filename. testsuite: * g++.old_deja/g++.pt/instantiate12.C: New test. From-SVN: r38801
2001-01-04call.c (build_conv): Don't use build1 for USER_CONV.Mark Mitchell1-4/+4
* call.c (build_conv): Don't use build1 for USER_CONV. * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes. From-SVN: r38688
2001-01-03class.c (invalidate_class_lookup_cache): Zero the previous_class_values.Mark Mitchell1-10/+15
* class.c (invalidate_class_lookup_cache): Zero the previous_class_values. * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not TREE_INT_CST_HIGH. (CLASSTYPE_TEMPLATE_LEVEL): Likewise. * decl.c (free_bindings): New variable. (push_binding): Don't create a new binding if we have one on the free list. (pop_binding): Put old bindings on the free list. (init_decl_processing): Use size_int, not build_int_2. Register free_bindings as a GC root. (cp_make_fname_decl): Use size_int, not build_int_2. (push_inline_template_parms_recursive): Likewise. (end_template_parm_list): Likewise. (for_each_tempalte_parm): Do not use walk_tree_without_duplicates. (tsubst_template_parms): Use size_int, not build_int_2. (tsubst): Likewise. * rtti.c (get_vmi_pseudo_type_info): Likewise. From-SVN: r38641
2000-12-29class.c (pushclass): Remove #if 0'd code.Mark Mitchell1-20/+6
* class.c (pushclass): Remove #if 0'd code. * cp-tree.h (overload_template_name): Remove. * decl.c (store_bindings): Simplify. (pop_from_top_level): Likewise. * pt.c (overload_template_name): Remove. (instantiate_decl): Don't call push_to_top_level if it's not needed. From-SVN: r38530
2000-12-29Add commentMark Mitchell1-0/+4
From-SVN: r38525
2000-12-29pt.c (register_local_specialization): Don't return a value.Mark Mitchell1-11/+20
* pt.c (register_local_specialization): Don't return a value. (lookup_template_class): Use move-to-front heuristic when looking up template instantiations. (instantiate_decl): Only push_to_top_level when we're actually going to instantiate the template. From-SVN: r38524
2000-12-22pt.c (more_specialized): Don't optimize len==0.Jason Merrill1-3/+2
* pt.c (more_specialized): Don't optimize len==0. (fn_type_unification): If we're adding the return type, increase len. From-SVN: r38472
2000-12-22In partial ordering for a call, ignore parms for which we don't have a real ↵Jason Merrill1-54/+67
argument. In partial ordering for a call, ignore parms for which we don't have a real argument. * call.c (joust): Pass len to more_specialized. (add_template_candidate_real): Strip 'this', pass len. * pt.c (more_specialized): Pass len down. Lose explicit_args parm. (get_bindings_order): New fn. Pass len down. (get_bindings_real): Strip 'this', pass len. (fn_type_unification): Likewise. (type_unification_real): Succeed after checking 'len' args. (most_specialized_instantiation): Lose explicit_args parm. * class.c (resolve_address_of_overloaded_function): Strip 'this', pass len. From-SVN: r38460
2000-12-21pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not DECL_TEMPLATE_RESULT.Jason Merrill1-1/+1
* pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not DECL_TEMPLATE_RESULT. * search.c (lookup_field_r): Call lookup_fnfields_1, not lookup_fnfields_here. * parse.y (typename_sub2): Return the TYPE_DECL, not the type. * call.c (build_object_call): Also allow conversions that return reference to pointer to function. (add_conv_candidate): Handle totype being ref to ptr to fn. (build_field_call): Also allow members of type reference to function. Lose support for calling pointer to METHOD_TYPE fields. * error.c (dump_expr): Handle *_CAST_EXPR. * typeck2.c (build_scoped_ref): Always convert to the naming class. * tree.c (break_out_cleanups): Lose. * cp-tree.h: Remove prototype. * typeck.c (build_component_ref): Don't break_out_cleanups. (build_compound_expr): Likewise. * semantics.c (finish_expr_stmt): Likewise. From-SVN: r38417
2000-12-16pt.c (unify): Handle when both ARG and PARM are BOUND_TEMPLATE_TEMPLATE_PARM.Kriang Lerdsuwanakij1-5/+7
* pt.c (unify): Handle when both ARG and PARM are BOUND_TEMPLATE_TEMPLATE_PARM. * g++.old-deja/g++.pt/ttp65.C: New test. From-SVN: r38301
2000-12-16pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and DECL_TEMPLATE_PARM_P.Kriang Lerdsuwanakij1-0/+3
* pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and DECL_TEMPLATE_PARM_P. * g++.old-deja/g++.pt/ttp64.C: New test. From-SVN: r38300
2000-12-15pt.c (check_explicit_specialization): Propagate default function arguments ↵Kriang Lerdsuwanakij1-0/+25
to explicit specializations. * pt.c (check_explicit_specialization): Propagate default function arguments to explicit specializations. * g++.old-deja/g++.pt/spec33.C: New test. From-SVN: r38266
2000-12-14commentJason Merrill1-0/+3
From-SVN: r38258
2000-12-09error.c (dump_function_name): Don't let the user see __comp_ctor.Jason Merrill1-9/+2
* error.c (dump_function_name): Don't let the user see __comp_ctor. Clean up copy-initialization in overloading code. * call.c (build_user_type_conversion_1): Die if we are asked to convert to the same or a base type. (implicit_conversion): Avoid doing so. Lose reference binding code. (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit direct-initialization. Also do direct-init part of copy-init. (build_user_type_conversion): Don't provide context to convert_like. * cvt.c (ocp_convert): build_user_type_conversion will now provide the constructor call for copy-init. * pt.c (tsubst_decl): Call clone_function_decl here if this is an instantiation of a member template. (do_decl_instantiation): Not here. From-SVN: r38158
2000-12-07pt.c (verify_class_unification): New function.Kriang Lerdsuwanakij1-27/+83
* pt.c (verify_class_unification): New function. (get_class_bindings): Use it. (try_class_unification): Tidy. (unify): Handle when argument of a template-id is not template parameter dependent. (template_args_equal): Handle when TREE_CODE's do not match. * g++.old-deja/g++.oliva/partspec1.C: Remove XFAIL. * g++.old-deja/g++.pt/partial4.C: New test. From-SVN: r38102
2000-12-05revert cloning patchJason Merrill1-1/+9
From-SVN: r38035
2000-12-04mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".Jason Merrill1-9/+3
* mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector". (write_builtin_type): Pass intSI_type_node and the like through type_for_mode. * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'. Pass intSI_type_node and the like through type_for_mode. * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE. * pt.c (tsubst, unify): Likewise. * tree.c (walk_tree): Likewise. * error.c (dump_type): Likewise. (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE. * Make-lang.in: Tweak top comment for emacs. (cp/TAGS): Restore. * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw. * pt.c (tsubst_decl): Call clone_function_decl here. (do_decl_instantiation): Not here. * class.c (clone_function_decl): Robustify. * decl.c (store_bindings): Only search in the non modified old_bindings for duplicates. From-SVN: r37999
2000-12-02* pt.c: Fix typo in comments.Kriang Lerdsuwanakij1-27/+27
From-SVN: r37939
2000-11-27decl.c (grokfndecl): Undo COMPONENT_REF damage caused by bison parser ickiness.Nathan Sidwell1-9/+14
cp: * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by bison parser ickiness. * pt.c (tsubst_friend_function): Enter namespace scope when tsubsting the function name. * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality. testsuite: * g++.old-deja/g++.other/friend46.C: New test. From-SVN: r37793
2000-11-23pt.c (lookup_template_class): Simplify loop exit constructs.Nathan Sidwell1-23/+26
cp: * pt.c (lookup_template_class): Simplify loop exit constructs. Cope when there is no partial instantiation of a template template member. testsuite: * g++.old-deja/g++.pt/instantiate9.C: New test. From-SVN: r37698
2000-11-22pt.c (do_decl_instantiate): Explicitly clone constructors and destructors ↵Mark Mitchell1-0/+9
that haven't already been cloned. * pt.c (do_decl_instantiate): Explicitly clone constructors and destructors that haven't already been cloned. From-SVN: r37673
2000-11-17fix thinko in last changeNathan Sidwell1-1/+1
From-SVN: r37520
2000-11-17pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.Nathan Sidwell1-0/+3
cp: * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type. testsuite: * g++.old-deja/g++.pt/instantiate8.C: New test. From-SVN: r37518
2000-11-10Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o.Mark Mitchell1-29/+1
* Makefile.in (C_AND_OBJC_OBJS): Add c-dump.o. (c-dump.o): New target. * c-common.h (flag_dump_translation_unit): New variable. (C_TYPE_QUALS): New macro. (strip_array_types): New function. (DECL_C_BIT_FIELD): New macro. (SET_DECL_C_BIT_FIELD): Likewise. (CLEAR_DECL_C_BIT_FIELD): Likewise. (dump_info_p): New typedef. (dump_tree_fn): Likewise. (lang_dump_tree): New variable. (dump_node_to_file): New function. * c-common.c (flag_dump_translation_unit): Define it. (strip_array_types): New function. * c-decl.c (c_decode_option): Handle -fdump-translation-unit. * c-lang.c (finish_file): Call dump_node_to_file if flag_dump_translation_unit. * c-semantics.c (mark_rtl_for_local_static): Fix typo in comment. * c-tree.h (DECL_C_BIT_FIELD): Remove declaration. * c-dump.c: New file. * Make-lang.in (CXX_C_OBJS): Add c-dump.o. (dump.o): Update dependency list. * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove. (flag_dump_translation_unit): Likewise. (CP_TYPE_QUALS): Adjust definition. (DECL_C_BIT_FIELD): Remove. (SET_DECL_C_BIT_FIELD): Likewise. (CLEAR_DECL_C_BIT_FIELD): Likewise. (add_maybe_template): Likewise. (strip_array_types): Likewise. (dump_node_to_file): Likewise. (cp_dump_tree): New function. * decl.c (init_decl_processing): Set lang_dump_tree. * decl2.c (flag_dump_translation_unit): Remove. * dump.c: Move most of it to ../c-dump.c. (cp_dump_tree): New function. * pt.c (add_maybe_template): Remove. * typeck.c (strip_array_types): Likewise. From-SVN: r37358
2000-11-07alias.c [...] (init_alias_analysis, [...]): Use memset () instead of bzero ().Joseph Myers1-4/+4
* alias.c (init_alias_analysis), calls.c (expand_call, emit_library_call_value_1), combine.c (init_reg_last_arrays), cse.c (new_basic_block), dbxout.c (dbxout_type), diagnostic.c (init_output_buffer, set_diagnostic_context), dwarf2out.c (equate_decl_number_to_die, build_abbrev_table), emit-rtl.c (init_emit_once), fold-const.c (mul_double, div_and_round_double), function.c (assign_parms), gcse.c (compute_can_copy, alloc_gcse_mem, alloc_reg_set_mem, record_one_set, compute_hash_table, compute_set_hash_table, compute_expr_hash_table), genattrtab.c (optimize_attrs), global.c (global_alloc, global_conflicts), haifa-sched.c (compute_trg_info, clear_units, schedule_block), integrate.c (initialize_for_inline, expand_inline_function), jump.c (thread_jumps), local-alloc.c (local_alloc), loop.c (combine_movables, count_loop_regs_set, load_mems_and_recount_loop_regs_set), print-tree.c (debug_tree), regclass.c (init_reg_sets, init_reg_sets_1, regclass, record_reg_classes, allocate_reg_info), reload.c (get_secondary_mem, remove_address_replacements, find_reloads), reload1.c (reload, set_initial_label_offsets, finish_spills, reload_as_needed, choose_reload_regs_init, reload_cse_simplify_operands), reorg.c (dbr_schedule), sbitmap.c (sbitmap_zero), simplify-rtx.c (simplify_plus_minus), ssa.c (rename_registers), stmt.c (expand_end_case), unroll.c (unroll_loop), varray.c (varray_grow), objc/objc-act.c: Use memset () instead of bzero (). ch: * actions.c (check_missing_cases), typeck.c (build_chill_slice, build_chill_cast): Use memset () instead of bzero (). cp: * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c (push_binding_level), error.c (cp_tree_printer), pt.c (process_partial_specialization, tsubst_template_arg_vector), search.c (lookup_member): Use memset () instead of bzero (). java: * expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c (init_outgoing_cpool), lex.c (java_init_lex): Use memset () instead of bzero (). From-SVN: r37303
2000-10-31memtemp77.C (main): Adjust comparison against.Gabriel Dos Reis1-4/+4
testsuite/ * g++.old-deja/g++.pt/memtemp77.C (main): Adjust comparison against. __PRETTY_FUNCTION__ cp/ * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace TS_* flags with corresponding TFF_*. Adjust prototypes of functions (which used to take a tree_string_flags) to take an int. * cp-tree.h (enum tree_string_flags): Remove (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE, TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION, TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros. (type_as_string, decl_as_string, expr_as_string, context_as_string): Adjust prototype. * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER instead of TS_PLAIN. * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of plain `0'. From-SVN: r37152
2000-10-31cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.Mark Mitchell1-3/+3
* cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro. (linkage_kind): New enumeration. (decl_linkage): New function. * decl2.c (comdat_linkage): Extend comment. * error.c (dump_function_decl): Print the arguments used to instantiate a template, even when not printing the type of the function. * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P, not TREE_PUBLIC, to test for external linkage. * tree.c (decl_linkage): New function. From-SVN: r37150