diff options
author | Ville Voutilainen <ville.voutilainen@gmail.com> | 2015-10-12 11:55:19 +0300 |
---|---|---|
committer | Ville Voutilainen <ville@gcc.gnu.org> | 2015-10-12 11:55:19 +0300 |
commit | 7624ca36a275ec0c86f6740b079dcc08215883bf (patch) | |
tree | 1f4d6eff28e77c55180e3fe94d2ec975f135935b /gcc/cp/lambda.c | |
parent | 15f128a7193fe0724c9e1e4f0d6a015af7f1b97d (diff) | |
download | gcc-7624ca36a275ec0c86f6740b079dcc08215883bf.zip gcc-7624ca36a275ec0c86f6740b079dcc08215883bf.tar.gz gcc-7624ca36a275ec0c86f6740b079dcc08215883bf.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r-- | gcc/cp/lambda.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index ceab646..b4f19af 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -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))); |