PR c++/58566
/cp
2015-10-12 Ville Voutilainen <ville.voutilainen@gmail.com>
PR c++/58566
* lambda.c (lambda_return_type): Return error_mark_node
instead of void_type_node for the error cases.
/testsuite
2015-10-12 Ville Voutilainen <ville.voutilainen@gmail.com>
PR c++/58566
* g++.dg/cpp0x/lambda/lambda-58566.C: New.
From-SVN: r228706
+2015-10-12 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ PR c++/58566
+ * lambda.c (lambda_return_type): Return error_mark_node
+ instead of void_type_node for the error cases.
+
2015-10-08 Jason Merrill <jason@redhat.com>
* cp-tree.h (SIMPLE_TARGET_EXPR_P): New.
|| BRACE_ENCLOSED_INITIALIZER_P (expr))
{
cxx_incomplete_type_error (expr, TREE_TYPE (expr));
- return void_type_node;
+ return error_mark_node;
}
gcc_checking_assert (!type_dependent_expression_p (expr));
return cv_unqualified (type_decays_to (unlowered_expr_type (expr)));
+2015-10-12 Ville Voutilainen <ville.voutilainen@gmail.com>
+
+ PR c++/58566
+ * g++.dg/cpp0x/lambda/lambda-58566.C: New.
+
2015-10-10 Jan Hubicka <hubicka@ucw.cz>
* gfortran.dg/lto/bind_c-2_0.f90: New testcase.
--- /dev/null
+// PR c++/58566
+// { dg-do compile { target c++11 } }
+
+struct A
+{
+ int foo()
+ {
+ [this]{ return foo; }; // { dg-error "invalid use of member function|cannot convert" }
+ }
+};