This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[C++ PATCH, committed] [PR14971] Clarification of diagnostic on function template partial spec


Hello,

this patch was approved by Gaby within Bugzilla, but stayed there for some
weeks, so I just went ahead and committed it to mainline after a little
testing.

Giovanni Bajo


cp/
        PR c++/14971
        * pt.c (check_explicit_specialization): Clarify error message.


Index: pt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/cp/pt.c,v
retrieving revision 1.876
diff -c -3 -p -r1.876 pt.c
*** pt.c 26 Jun 2004 21:11:19 -0000 1.876
--- pt.c 3 Jul 2004 01:59:59 -0000
*************** check_explicit_specialization (tree decl
*** 1690,1697 ****
        template <class T> void f<int>(); */

     if (uses_template_parms (declarator))
!      error ("partial specialization `%D' of function template",
!         declarator);
     else
       error ("template-id `%D' in declaration of primary template",
          declarator);
--- 1690,1697 ----
        template <class T> void f<int>(); */

     if (uses_template_parms (declarator))
!      error ("function template partial specialization `%D' "
!      "is not allowed", declarator);
     else
       error ("template-id `%D' in declaration of primary template",
          declarator);



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]