+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.
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)
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));