diff options
Diffstat (limited to 'gcc/cp')
-rw-r--r-- | gcc/cp/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/cp/parser.c | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 01b8c4d..035a1b7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2017-10-04 Paolo Carlini <paolo.carlini@oracle.com> + Andrew Pinski <apinski@cavium.com> + + PR c++/71946 + * parser.c (cp_parser_lambda_body): Set parser->in_function_body. + 2017-10-04 Nathan Sidwell <nathan@acm.org> Move mangling aliases out of global namespace. diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 6e817cb..28bc8e4 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -10557,6 +10557,7 @@ cp_parser_lambda_body (cp_parser* parser, tree lambda_expr) { bool nested = (current_function_decl != NULL_TREE); bool local_variables_forbidden_p = parser->local_variables_forbidden_p; + bool in_function_body = parser->in_function_body; if (nested) push_function_context (); else @@ -10567,6 +10568,7 @@ cp_parser_lambda_body (cp_parser* parser, tree lambda_expr) save_omp_privatization_clauses (omp_privatization_save); /* Clear this in case we're in the middle of a default argument. */ parser->local_variables_forbidden_p = false; + parser->in_function_body = true; /* Finish the function call operator - class_specifier @@ -10653,6 +10655,7 @@ cp_parser_lambda_body (cp_parser* parser, tree lambda_expr) restore_omp_privatization_clauses (omp_privatization_save); parser->local_variables_forbidden_p = local_variables_forbidden_p; + parser->in_function_body = in_function_body; if (nested) pop_function_context(); else |