aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 12fa923..51af020 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -741,6 +741,10 @@ synthesize_method (tree fndecl)
return;
}
+ /* We may be in the middle of deferred access check. Disable
+ it now. */
+ push_deferring_access_checks (dk_no_deferred);
+
if (! context)
push_to_top_level ();
else if (nested)
@@ -790,6 +794,8 @@ synthesize_method (tree fndecl)
pop_from_top_level ();
else if (nested)
pop_function_context_from (context);
+
+ pop_deferring_access_checks ();
}
/* Use EXTRACTOR to locate the relevant function called for each base &