This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: gcc/cp/pt.c: use ngettext() when needed
On Wed, 17 Feb 2010, Paolo Bonzini wrote:
> Marco, why don't you instead add warning_n/inform_n/error_n, like
>
> error_n (TREE_VEC_LENGTH (parms),
> "redeclared with %d template parameter",
> "redeclared with %d template parameters",
> TREE_VEC_LENGTH (parms));
>
> (compared to ngettext I'm moving the number argument before the strings, to
> make sure it's not confused with the first positional parameter of printf).
> This can be taught to exgettext with something like this:
If you add new functions like that, they should have a leading location_t
argument for an explicit location, rather than emulating the legacy
functions without an explicit location. (It's OK when converting a call
to use such a new function just to put input_location for the location
rather than trying to work out a more precise location for the error.)
--
Joseph S. Myers
joseph@codesourcery.com