mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
4a5d353fa8
commit
ea8b8aa005
|
|
@ -1,5 +1,8 @@
|
||||||
2010-04-27 Jason Merrill <jason@redhat.com>
|
2010-04-27 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
PR c++/43790
|
||||||
|
* tree.c (cv_unqualified): Handle error_mark_node.
|
||||||
|
|
||||||
PR c++/41468
|
PR c++/41468
|
||||||
* call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
|
* call.c (convert_like_real) [ck_ambig]: Just return error_mark_node
|
||||||
if we don't want errors.
|
if we don't want errors.
|
||||||
|
|
|
||||||
|
|
@ -934,7 +934,12 @@ cp_build_qualified_type_real (tree type,
|
||||||
tree
|
tree
|
||||||
cv_unqualified (tree type)
|
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);
|
quals &= ~(TYPE_QUAL_CONST|TYPE_QUAL_VOLATILE);
|
||||||
return cp_build_qualified_type (type, quals);
|
return cp_build_qualified_type (type, quals);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
2010-04-27 Jason Merrill <jason@redhat.com>
|
2010-04-27 Jason Merrill <jason@redhat.com>
|
||||||
|
|
||||||
|
* g++.dg/cpp0x/lambda/lambda-ice1.C: New.
|
||||||
|
|
||||||
PR c++/41468
|
PR c++/41468
|
||||||
* g++.dg/template/sfinae17.C: New.
|
* g++.dg/template/sfinae17.C: New.
|
||||||
* g++.dg/template/sfinae18.C: New.
|
* g++.dg/template/sfinae18.C: New.
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,13 @@
|
||||||
|
// 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" }
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue