re PR c++/58566 ([c++11] ICE with invalid expression in lambda body)
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
This commit is contained in:
parent
15f128a719
commit
7624ca36a2
@ -1,3 +1,9 @@
|
||||
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.
|
||||
|
@ -175,7 +175,7 @@ lambda_return_type (tree expr)
|
||||
|| 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)));
|
||||
|
@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
10
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-58566.C
Normal file
10
gcc/testsuite/g++.dg/cpp0x/lambda/lambda-58566.C
Normal file
@ -0,0 +1,10 @@
|
||||
// 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" }
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user