aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/friend.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/friend.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/friend.c')
-rw-r--r--gcc/cp/friend.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/cp/friend.c b/gcc/cp/friend.c
index e68af3d..d0cbaed 100644
--- a/gcc/cp/friend.c
+++ b/gcc/cp/friend.c
@@ -166,7 +166,8 @@ add_friend (tree type, tree decl, bool complain)
ctx = DECL_CONTEXT (decl);
if (ctx && CLASS_TYPE_P (ctx) && !uses_template_parms (ctx))
- perform_or_defer_access_check (TYPE_BINFO (ctx), decl, decl);
+ perform_or_defer_access_check (TYPE_BINFO (ctx), decl, decl,
+ tf_warning_or_error);
maybe_add_class_template_decl_list (type, decl, /*friend_p=*/1);