diff options
Diffstat (limited to 'gcc/cp/lambda.c')
-rw-r--r-- | gcc/cp/lambda.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c index c582aa5..b448ea7 100644 --- a/gcc/cp/lambda.c +++ b/gcc/cp/lambda.c @@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see #include "tree-iterator.h" #include "toplev.h" #include "gimplify.h" +#include "target.h" /* Constructor for a lambda expression. */ @@ -579,6 +580,9 @@ add_capture (tree lambda, tree id, tree orig_init, bool by_reference_p, cxx_incomplete_type_inform (type); return error_mark_node; } + else if (!verify_type_context (input_location, + TCTX_CAPTURE_BY_COPY, type)) + return error_mark_node; } } |