http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51314

--- Comment #2 from Marc Glisse <marc.glisse at normalesup dot org> 2012-04-19 
21:19:23 UTC ---
Created attachment 27200
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=27200
patch

s.cc: In function 'void f(U ...)':
s.cc:3:18: error: 'sizeof...' argument must be surrounded by parentheses
       A<sizeof...U> x; // template argument 1 is invalid
                  ^
s.cc:3:19: error: template argument 1 is invalid
       A<sizeof...U> x; // template argument 1 is invalid
                   ^
s.cc:3:22: error: invalid type in declaration before ';' token
       A<sizeof...U> x; // template argument 1 is invalid
                      ^
s.cc: At global scope:
s.cc:10:37: error: 'sizeof...' argument must be surrounded by parentheses
       typedef Indices<I...,sizeof...I> type; // OK
                                     ^

Error recovery is not that great in the first case, but fine in the second.

Reply via email to