This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
pt.c: (process_partial_specialization) use error_n instead of error
- From: Marco Poletti <poletti dot marco at gmail dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 2 Mar 2010 10:12:13 +0100
- Subject: pt.c: (process_partial_specialization) use error_n instead of error
Use error_n() function instead of plain error(), so translators can
translate each plural form.
Changelog:
* pt.c (process_partial_specialization): use error_n instead of error
Patch:
Index: gcc/cp/pt.c
===================================================================
--- gcc/cp/pt.c (revisione 157160)
+++ gcc/cp/pt.c (copia locale)
@@ -3987,16 +3987,19 @@ process_partial_specialization (tree dec
If they are fully specialized in the
specialization, that's OK. */
int j;
+ int count = 0;
for (j = 0; j < nargs; ++j)
if (tpd2.parms[j] != 0
&& tpd.arg_uses_template_parms [j])
- {
- error ("type %qT of template argument %qE depends "
- "on template parameter(s)",
- type,
- arg);
- break;
- }
+ ++count;
+ if (count != 0)
+ error_n (input_location, count,
+ "type %qT of template argument %qE depends "
+ "on a template parameter",
+ "type %qT of template argument %qE depends "
+ "on template parameters",
+ type,
+ arg);
}
}
}