http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51145
--- Comment #2 from Dodji Seketeli <dodji at gcc dot gnu.org> 2011-11-18 00:03:04 UTC --- Created attachment 25849 --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25849 Candidate patch I am currently testing the attached patch. Note that the hunk of pt.c should be committed separately as a fix for PR c++/51191; I am including it here so that this patch can be tested in isolation. On the example provided, I am getting the following output with the patch applied: $ cat -n test.cc 1 struct A {}; 2 3 template<class> 4 using X = A; 5 6 struct X<int>* px; 7 8 template<int> 9 using Y = A; 10 11 struct Y<0>* py; $ ./cc1plus -quiet -std=c++0x test.cc test.cc:6:8: error: using alias template specialization ‘X<int> {aka A}’ after ‘struct’ test.cc:6:18: error: invalid type in declaration before ‘;’ token test.cc:11:8: error: using alias template specialization ‘Y<0> {aka A}’ after ‘struct’ test.cc:11:16: error: invalid type in declaration before ‘;’ token $