2011-08-02 Jason Merrill <jason@redhat.com>
+ PR c++/43886
+ * parser.c (cp_parser_lambda_body): Clear local_variables_forbidden_p.
+
PR c++/49577
* typeck2.c (check_narrowing): Check unsigned mismatch.
* semantics.c (finish_compound_literal): check_narrowing.
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;
if (nested)
push_function_context ();
else
/* Still increment function_depth so that we don't GC in the
middle of an expression. */
++function_depth;
+ /* Clear this in case we're in the middle of a default argument. */
+ parser->local_variables_forbidden_p = false;
/* Finish the function call operator
- class_specifier
expand_or_defer_fn (finish_function (/*inline*/2));
}
+ parser->local_variables_forbidden_p = local_variables_forbidden_p;
if (nested)
pop_function_context();
else