aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/name-lookup.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2010-04-27 17:26:25 -0400
committerJason Merrill <jason@gcc.gnu.org>2010-04-27 17:26:25 -0400
commita684685337dc14afc172c7e2172b40d65dd4fa7b (patch)
tree29e991f81e1c25904d490958f6de0701b19fd4a6 /gcc/cp/name-lookup.c
parent16de17aec71ab79c098ce82ac091f447f272834c (diff)
downloadgcc-a684685337dc14afc172c7e2172b40d65dd4fa7b.zip
gcc-a684685337dc14afc172c7e2172b40d65dd4fa7b.tar.gz
gcc-a684685337dc14afc172c7e2172b40d65dd4fa7b.tar.bz2
re PR c++/43856 ([C++0x] gcc-4.5.0 fails to transform id-expression into class member access in lambda compound-statement)
PR c++/43856 * name-lookup.c (qualify_lookup): Disqualify lambda op(). * class.c (current_nonlambda_class_type): New fn. * semantics.c (nonlambda_method_basetype): New. * cp-tree.h: Declare them. * tree.c (maybe_dummy_object): Handle implicit 'this' capture. From-SVN: r158807
Diffstat (limited to 'gcc/cp/name-lookup.c')
-rw-r--r--gcc/cp/name-lookup.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/name-lookup.c b/gcc/cp/name-lookup.c
index b4ac49f..5586bf7 100644
--- a/gcc/cp/name-lookup.c
+++ b/gcc/cp/name-lookup.c
@@ -3807,6 +3807,10 @@ qualify_lookup (tree val, int flags)
if (cp_unevaluated_operand && TREE_CODE (val) == FIELD_DECL
&& DECL_NORMAL_CAPTURE_P (val))
return false;
+ /* None of the lookups that use qualify_lookup want the op() from the
+ lambda; they want the one from the enclosing class. */
+ if (TREE_CODE (val) == FUNCTION_DECL && LAMBDA_FUNCTION_P (val))
+ return false;
return true;
}