* semantics.c (finish_id_expression): Use
current_nonlambda_class_type for qualified-ids.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@178339
138bc75d-0d04-0410-961f-
82ee72b054a4
2011-08-30 Jason Merrill <jason@redhat.com>
+ PR c++/50089
+ * semantics.c (finish_id_expression): Use
+ current_nonlambda_class_type for qualified-ids.
+
PR c++/50114
* decl.c (poplevel): Disable for scope compatibility hack
in C++11 mode.
if (scope)
{
decl = (adjust_result_of_qualified_name_lookup
- (decl, scope, current_class_type));
+ (decl, scope, current_nonlambda_class_type()));
if (TREE_CODE (decl) == FUNCTION_DECL)
mark_used (decl);
2011-08-30 Jason Merrill <jason@redhat.com>
+ PR c++/50089
+ * g++.dg/cpp0x/lambda/lambda-qualified.C: New.
+
PR c++/50114
* g++.dg/cpp0x/lambda/lambda-for.C: New.
--- /dev/null
+// PR c++/50089
+// { dg-options -std=c++0x }
+
+struct TestBase
+{
+ void foo() {}
+};
+
+struct Test : TestBase
+{
+ void foo()
+ {
+ [this]{
+ /*this->*/TestBase::foo(); // ICE without this->
+ }();
+ }
+};