aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2000-12-09 13:34:12 -0500
committerJason Merrill <jason@gcc.gnu.org>2000-12-09 13:34:12 -0500
commit5e818b935158ec6f4b03e583c7e9a3c2d986fd9e (patch)
tree54b3338c1d73ee9a2ebbb69f448b63e37a850f4e /gcc/cp/pt.c
parent193ad8c673aeacf0f13882c7816c6e6aeee240de (diff)
downloadgcc-5e818b935158ec6f4b03e583c7e9a3c2d986fd9e.zip
gcc-5e818b935158ec6f4b03e583c7e9a3c2d986fd9e.tar.gz
gcc-5e818b935158ec6f4b03e583c7e9a3c2d986fd9e.tar.bz2
error.c (dump_function_name): Don't let the user see __comp_ctor.
* 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
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 900ef3c..87d4195 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5788,6 +5788,8 @@ tsubst_decl (t, args, type, in_decl)
maybe_retrofit_in_chrg (r);
if (DECL_CONSTRUCTOR_P (r))
grok_ctor_properties (ctx, r);
+ if (PRIMARY_TEMPLATE_P (gen_tmpl))
+ clone_function_decl(r, /*update_method_vec_p=*/0);
}
else if (IDENTIFIER_OPNAME_P (DECL_NAME (r)))
grok_op_properties (r, DECL_VIRTUAL_P (r), DECL_FRIEND_P (r));
@@ -9280,15 +9282,6 @@ do_decl_instantiation (declspecs, declarator, storage)
cp_error ("storage class `%D' applied to template instantiation",
storage);
- /* Under the new ABI, we need to make sure to instantiate all the
- cloned versions of constructors or destructors. */
- if (flag_new_abi &&
- (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P (result) ||
- DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P (result)) &&
- !(TREE_CHAIN (result) &&
- DECL_CLONED_FUNCTION (TREE_CHAIN (result))))
- clone_function_decl(result, /*update_method_vec_p=*/0);
-
SET_DECL_EXPLICIT_INSTANTIATION (result);
mark_decl_instantiated (result, extern_p);
repo_template_instantiated (result, extern_p);