aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/method.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-11-04 11:52:18 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-11-04 11:52:18 -0400
commitf7d042e2738fd5382cbdcb3284c237968fda4149 (patch)
tree221d644800428ec7dde33449c48ccf4fbd9b0e14 /gcc/cp/method.c
parentf2b01cfb6dcbf8dd471eee611d26c0cf094683f5 (diff)
downloadgcc-f7d042e2738fd5382cbdcb3284c237968fda4149.zip
gcc-f7d042e2738fd5382cbdcb3284c237968fda4149.tar.gz
gcc-f7d042e2738fd5382cbdcb3284c237968fda4149.tar.bz2
semantics.c (speculative_access_check): New.
* semantics.c (speculative_access_check): New. * cp-tree.h: Declare it. * call.c (build_over_call): Use it. * class.c (type_has_constexpr_default_constructor): Use locate_ctor. * method.c (locate_ctor): Use push/pop_deferring_access_checks. From-SVN: r166317
Diffstat (limited to 'gcc/cp/method.c')
-rw-r--r--gcc/cp/method.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index ca5964e..c1d30d4 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -849,8 +849,12 @@ get_dtor (tree type)
tree
locate_ctor (tree type)
{
- tree fn = locate_fn_flags (type, complete_ctor_identifier, NULL_TREE,
- LOOKUP_SPECULATIVE, tf_none);
+ tree fn;
+
+ push_deferring_access_checks (dk_no_check);
+ fn = locate_fn_flags (type, complete_ctor_identifier, NULL_TREE,
+ LOOKUP_SPECULATIVE, tf_none);
+ pop_deferring_access_checks ();
if (fn == error_mark_node)
return NULL_TREE;
return fn;