PR c++/51314
* parser.c (cp_parser_sizeof_operand): Require parentheses for
sizeof...
From-SVN: r186988
+2012-04-30 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/51314
+ * parser.c (cp_parser_sizeof_operand): Require parentheses for
+ sizeof...
+
2012-04-30 Dodji Seketeli <dodji@redhat.com>
Fix location for static class members
/*attrlist=*/NULL);
}
}
+ else if (pack_expansion_p)
+ permerror (cp_lexer_peek_token (parser->lexer)->location,
+ "%<sizeof...%> argument must be surrounded by parentheses");
/* If the type-id production did not work out, then we must be
looking at the unary-expression production. */
+2012-04-30 Marc Glisse <marc.glisse@inria.fr>
+
+ PR c++/51314
+ * g++.dg/cpp0x/vt-51314.C: New test.
+ * g++.dg/cpp0x/variadic76.C: Fix.
+
2012-04-30 Greta Yorsh <Greta.Yorsh@arm.com>
* gcc.dg/pr52283.c: Add missing dg-warning and dg-options.
template<int... N> int foo ()
{
- return sizeof... N (); // { dg-error "cannot be used as a function" }
+ return sizeof... (N ()); // { dg-error "cannot be used as a function" }
+ return sizeof... (N) (); // { dg-error "cannot be used as a function" }
}
int bar ()