aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-05-24 04:34:38 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-05-24 04:34:38 +0000
commit212e70482f2cf205a9cb82744a89a582b36d87ee (patch)
tree67ca3465fa40cb3dd5317fc4f37172ea06c56907 /gcc/cp
parent5896bebb9a0a086051cc4b02677883a671666912 (diff)
downloadgcc-212e70482f2cf205a9cb82744a89a582b36d87ee.zip
gcc-212e70482f2cf205a9cb82744a89a582b36d87ee.tar.gz
gcc-212e70482f2cf205a9cb82744a89a582b36d87ee.tar.bz2
decl2.c (maybe_retrofit_in_chrg): Don't create in-charge parameters for template functions.
* decl2.c (maybe_retrofit_in_chrg): Don't create in-charge parameters for template functions. * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for destructors as well as constructors. From-SVN: r34120
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/decl2.c5
-rw-r--r--gcc/cp/pt.c5
3 files changed, 15 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 40e7175..d9ebe03 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2000-05-23 Mark Mitchell <mark@codesourcery.com>
+
+ * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
+ parameters for template functions.
+ * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
+ destructors as well as constructors.
+
2000-05-22 Mark Mitchell <mark@codesourcery.com>
* class.c (build_ctor_vtbl_group): Set inits.
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index a8ab3fd..c88779c 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -944,6 +944,11 @@ maybe_retrofit_in_chrg (fn)
if (DECL_HAS_IN_CHARGE_PARM_P (fn))
return;
+ /* When processing templates we can't know, in general, whether or
+ not we're going to have virtual baseclasses. */
+ if (uses_template_parms (fn))
+ return;
+
/* We don't need an in-charge parameter for constructors that don't
have virtual bases. */
if (DECL_CONSTRUCTOR_P (fn)
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index 04cac4e..5e2ff5e 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -5784,10 +5784,11 @@ tsubst_decl (t, args, type, in_decl)
in_decl);
}
- if (DECL_CONSTRUCTOR_P (r))
+ if (DECL_CONSTRUCTOR_P (r) || DECL_DESTRUCTOR_P (r))
{
maybe_retrofit_in_chrg (r);
- grok_ctor_properties (ctx, r);
+ if (DECL_CONSTRUCTOR_P (r))
+ grok_ctor_properties (ctx, r);
}
else if (DECL_OVERLOADED_OPERATOR_P (r))
grok_op_properties (r, DECL_VIRTUAL_P (r), DECL_FRIEND_P (r));