PR c++/60250
* parser.c (cp_parser_direct_declarator): Don't wrap a
type-dependent expression in a NOP_EXPR.
From-SVN: r207996
2014-02-21 Jason Merrill <jason@redhat.com>
+ PR c++/60250
+ * parser.c (cp_parser_direct_declarator): Don't wrap a
+ type-dependent expression in a NOP_EXPR.
+
PR c++/60251
* lambda.c (is_normal_capture_proxy): Handle VLA capture.
"array bound is not an integer constant");
bounds = error_mark_node;
}
- else if (processing_template_decl)
+ else if (processing_template_decl
+ && !type_dependent_expression_p (bounds))
{
/* Remember this wasn't a constant-expression. */
bounds = build_nop (TREE_TYPE (bounds), bounds);
--- /dev/null
+// PR c++/60250
+// { dg-options "-std=c++1y -pedantic-errors" }
+
+template<typename> void foo()
+{
+ typedef int T[ ([](){ return 1; }()) ]; // { dg-error "runtime bound" }
+}