PR c++/51046
* parser.c (cp_parser_range_for): check_for_bare_parameter_packs.
From-SVN: r181239
2011-11-09 Jason Merrill <jason@redhat.com>
2011-11-09 Jason Merrill <jason@redhat.com>
+ PR c++/51046
+ * parser.c (cp_parser_range_for): check_for_bare_parameter_packs.
+
PR c++/51029
* class.c (build_base_path): Don't ICE in fold_non_dependent_expr.
PR c++/51029
* class.c (build_base_path): Don't ICE in fold_non_dependent_expr.
at instantiation. If not, it is done just ahead. */
if (processing_template_decl)
{
at instantiation. If not, it is done just ahead. */
if (processing_template_decl)
{
+ if (check_for_bare_parameter_packs (range_expr))
+ range_expr = error_mark_node;
stmt = begin_range_for_stmt (scope, init);
finish_range_for_decl (stmt, range_decl, range_expr);
if (!type_dependent_expression_p (range_expr)
stmt = begin_range_for_stmt (scope, init);
finish_range_for_decl (stmt, range_decl, range_expr);
if (!type_dependent_expression_p (range_expr)
+2011-11-09 Jason Merrill <jason@redhat.com>
+
+ PR c++/51046
+ * g++.dg/cpp0x/variadic119.C: New.
+
2011-11-09 Jakub Jelinek <jakub@redhat.com>
PR target/50911
2011-11-09 Jakub Jelinek <jakub@redhat.com>
PR target/50911
--- /dev/null
+// PR c++/51046
+// { dg-do compile { target c++11 } }
+
+template<int... IS>
+void f()
+{
+ for (int i : IS); // { dg-error "not expanded" }
+}
+
+int main()
+{
+ f<0, 1, 2>();
+}