aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorPaolo Carlini <paolo.carlini@oracle.com>2012-07-19 01:36:50 +0000
committerJason Merrill <jason@gcc.gnu.org>2012-07-18 21:36:50 -0400
commit0e69fdf016311cb8570c43d8ec67e9d5cb2f2aeb (patch)
treed39c6d48e17f0d85751becc5f496f94737ead16b /gcc/cp/method.c
parent1936ace05cdfab4a25242e03c2d70921f00576cb (diff)
downloadgcc-0e69fdf016311cb8570c43d8ec67e9d5cb2f2aeb.zip
gcc-0e69fdf016311cb8570c43d8ec67e9d5cb2f2aeb.tar.gz
gcc-0e69fdf016311cb8570c43d8ec67e9d5cb2f2aeb.tar.bz2
DR 1170 PR c++/51213
DR 1170 PR c++/51213 * semantics.c (perform_access_checks): Add complain parm, return bool. (perform_deferred_access_checks): Likewise. (perform_or_defer_access_check): Likewise. (speculative_access_check): Remove. * call.c (enforce_access): Add complain parm, return bool. * decl.c, friend.c, class.c, init.c, parser.c: Adjust callers. * search.c: Adjust callers. * cp-tree.h (TINFO_RECHECK_ACCESS_P): New macro. (FNDECL_RECHECK_ACCESS_P): New macro. * method.c (synthesized_method_walk): Stop deferring access checks. * pt.c (recheck_decl_substitution): New. (instantiate_template_1): Set and check FNDECL_RECHECK_ACCESS_P. Co-Authored-By: Jason Merrill <jason@redhat.com> From-SVN: r189639
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 20a6c87..c21ae15 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -1225,6 +1225,7 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p,
++cp_unevaluated_operand;
++c_inhibit_evaluation_warnings;
+ push_deferring_access_checks (dk_no_deferred);
scope = push_scope (ctype);
@@ -1342,6 +1343,7 @@ synthesized_method_walk (tree ctype, special_function_kind sfk, bool const_p,
pop_scope (scope);
+ pop_deferring_access_checks ();
--cp_unevaluated_operand;
--c_inhibit_evaluation_warnings;
}