summaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index a1817e32809..6e9e34e8faf 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -2926,6 +2926,8 @@ add_implicitly_declared_members (t, cant_have_default_ctor,
tree virtual_dtor = NULL_TREE;
tree *f;
+ ++adding_implicit_members;
+
/* Destructor. */
if (TYPE_HAS_NONTRIVIAL_DESTRUCTOR (t) && !TYPE_HAS_DESTRUCTOR (t))
{
@@ -2985,6 +2987,8 @@ add_implicitly_declared_members (t, cant_have_default_ctor,
*f = TYPE_METHODS (t);
TYPE_METHODS (t) = implicit_fns;
+ --adding_implicit_members;
+
return virtual_dtor;
}