Commit ea8b8aa0 by Jason Merrill Committed by Jason Merrill

re PR c++/43790 ([C++0x] In lambda express, calling member function of…

re PR c++/43790 ([C++0x] In lambda express, calling member function of non-captured class gives internal compiler error)

	PR c++/43790
	* tree.c (cv_unqualified): Handle error_mark_node.

From-SVN: r158801
parent 4a5d353f
2010-04-27 Jason Merrill <jason@redhat.com>
PR c++/43790
* tree.c (cv_unqualified): Handle error_mark_node.
PR c++/41468
* call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
if we don't want errors.
......
......@@ -934,7 +934,12 @@ cp_build_qualified_type_real (tree type,
tree
cv_unqualified (tree type)
{
int quals = TYPE_QUALS (type);
int quals;
if (type == error_mark_node)
return type;
quals = TYPE_QUALS (type);
quals &= ~(TYPE_QUAL_CONST|TYPE_QUAL_VOLATILE);
return cp_build_qualified_type (type, quals);
}
......
2010-04-27 Jason Merrill <jason@redhat.com>
* g++.dg/cpp0x/lambda/lambda-ice1.C: New.
PR c++/41468
* g++.dg/template/sfinae17.C: New.
* g++.dg/template/sfinae18.C: New.
......
// PR c++/43790
// { dg-options "-std=c++0x" }
struct A
{
int f();
};
int main()
{
A a;
auto l = [] () { return a.f(); }; // { dg-error "not captured|return" }
}
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