* tree.c (cv_unqualified): Handle error_mark_node.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158801
138bc75d-0d04-0410-961f-
82ee72b054a4
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.
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.
--- /dev/null
+// 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" }
+}