Commit 90677b8d by Jason Merrill Committed by Jason Merrill

re PR c++/50089 ([C++0x] ICE when calling a qualified base class member function…

re PR c++/50089 ([C++0x] ICE when calling a qualified base class member function within a lambda expr without "this->")

	PR c++/50089
	* semantics.c (finish_id_expression): Use
	current_nonlambda_class_type for qualified-ids.

From-SVN: r178339
parent 971df06b
2011-08-30 Jason Merrill <jason@redhat.com> 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 PR c++/50114
* decl.c (poplevel): Disable for scope compatibility hack * decl.c (poplevel): Disable for scope compatibility hack
in C++11 mode. in C++11 mode.
......
...@@ -3251,7 +3251,7 @@ finish_id_expression (tree id_expression, ...@@ -3251,7 +3251,7 @@ finish_id_expression (tree id_expression,
if (scope) if (scope)
{ {
decl = (adjust_result_of_qualified_name_lookup decl = (adjust_result_of_qualified_name_lookup
(decl, scope, current_class_type)); (decl, scope, current_nonlambda_class_type()));
if (TREE_CODE (decl) == FUNCTION_DECL) if (TREE_CODE (decl) == FUNCTION_DECL)
mark_used (decl); mark_used (decl);
......
2011-08-30 Jason Merrill <jason@redhat.com> 2011-08-30 Jason Merrill <jason@redhat.com>
PR c++/50089
* g++.dg/cpp0x/lambda/lambda-qualified.C: New.
PR c++/50114 PR c++/50114
* g++.dg/cpp0x/lambda/lambda-for.C: New. * g++.dg/cpp0x/lambda/lambda-for.C: New.
......
// PR c++/50089
// { dg-options -std=c++0x }
struct TestBase
{
void foo() {}
};
struct Test : TestBase
{
void foo()
{
[this]{
/*this->*/TestBase::foo(); // ICE without this->
}();
}
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment