+2018-03-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/84618
+ * parser.c (cp_parser_lambda_introducer): Reject any capture not
+ involving a VAR_DECL or a PARM_DECL.
+
2018-03-05 Pádraig Brady <P@draigBrady.com>
Jason Merrill <jason@redhat.com>
Nathan Sidwell <nathan@acm.org>
unqualified_name_lookup_error (capture_id);
continue;
}
- else if (DECL_P (capture_init_expr)
- && (!VAR_P (capture_init_expr)
- && TREE_CODE (capture_init_expr) != PARM_DECL))
+ else if (!VAR_P (capture_init_expr)
+ && TREE_CODE (capture_init_expr) != PARM_DECL)
{
error_at (capture_token->location,
- "capture of non-variable %qD ",
+ "capture of non-variable %qE ",
capture_init_expr);
- inform (DECL_SOURCE_LOCATION (capture_init_expr),
- "%q#D declared here", capture_init_expr);
+ if (DECL_P (capture_init_expr))
+ inform (DECL_SOURCE_LOCATION (capture_init_expr),
+ "%q#D declared here", capture_init_expr);
continue;
}
if (VAR_P (capture_init_expr)
+2018-03-05 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/84618
+ * g++.dg/cpp0x/lambda/lambda-ice29.C: New.
+ * g++.dg/cpp0x/lambda/lambda-ice17.C: Adjust.
+ * g++.dg/cpp0x/lambda/lambda-ice23.C: Likewise.
+
2018-03-05 Olga Makhotina <olga.makhotina@intel.com>
* g++.dg/other/i386-2.C: Add -mpconfig and -mwbnoinvd.