aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/lambda.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2017-08-29 15:51:23 -0400
committerJason Merrill <jason@gcc.gnu.org>2017-08-29 15:51:23 -0400
commit11399477539ec605bd904543163c9e9137395943 (patch)
treec85f3a633a40b0563809d56852c3087090ec1bf6 /gcc/cp/lambda.c
parent1a9de5b6b56a726313069f4447fbbbee469e99dc (diff)
downloadgcc-11399477539ec605bd904543163c9e9137395943.zip
gcc-11399477539ec605bd904543163c9e9137395943.tar.gz
gcc-11399477539ec605bd904543163c9e9137395943.tar.bz2
Various small fixes.
* lambda.c (build_lambda_object): Check for error_mark_node. * pt.c (make_pack_expansion): Set PACK_EXPANSION_LOCAL_P on the type pack as well. (tsubst_decl) [FUNCTION_DECL]: Set DECL_CONTEXT on the parameters. (tsubst) [TEMPLATE_PARM_INDEX]: Check for error_mark_node. From-SVN: r251428
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r--gcc/cp/lambda.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index 14ff6c2..337b9ee 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -59,7 +59,7 @@ build_lambda_object (tree lambda_expr)
tree node, expr, type;
location_t saved_loc;
- if (processing_template_decl)
+ if (processing_template_decl || lambda_expr == error_mark_node)
return lambda_expr;
/* Make sure any error messages refer to the lambda-introducer. */