Index: testsuite/g++.dg/cpp0x/variadic76.C =================================================================== --- testsuite/g++.dg/cpp0x/variadic76.C (revision 186616) +++ testsuite/g++.dg/cpp0x/variadic76.C (working copy) @@ -2,11 +2,12 @@ // { dg-do compile } // { dg-options "-std=gnu++0x" } template 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 () { return foo<0> (); Index: testsuite/g++.dg/cpp0x/vt-51314.C =================================================================== --- testsuite/g++.dg/cpp0x/vt-51314.C (revision 0) +++ testsuite/g++.dg/cpp0x/vt-51314.C (revision 0) @@ -0,0 +1,15 @@ +// { dg-options "-std=c++11" } +// { dg-prune-output "invalid" } + +templatestruct A{}; +templatevoid f(U...){ + A x; // { dg-error "surrounded by parentheses" } +} + + +template struct Indices; +template struct Next_increasing_indices; +template struct Next_increasing_indices > { + typedef Indices type; // { dg-error "surrounded by parentheses" } +}; + Property changes on: testsuite/g++.dg/cpp0x/vt-51314.C ___________________________________________________________________ Added: svn:eol-style + native Added: svn:keywords + Author Date Id Revision URL Index: cp/parser.c =================================================================== --- cp/parser.c (revision 186616) +++ cp/parser.c (working copy) @@ -21965,10 +21965,13 @@ cp_parser_sizeof_operand (cp_parser* par TYPENAME, /*initialized=*/0, /*attrlist=*/NULL); } } + else if (pack_expansion_p) + error_at (cp_lexer_peek_token (parser->lexer)->location, + "% 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. */ if (!expr) expr = cp_parser_unary_expression (parser, /*address_p=*/false,