This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix up one mishandled plural in diagnostics in gimple-ssa-sprintf.c
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>
- Cc: Jeff Law <law at redhat dot com>, gcc-patches at gcc dot gnu dot org, David Malcolm <dmalcolm at redhat dot com>
- Date: Tue, 19 Dec 2017 19:28:17 +0100
- Subject: Re: [PATCH] Fix up one mishandled plural in diagnostics in gimple-ssa-sprintf.c
- Authentication-results: sourceware.org; auth=none
- References: <20171219172049.GT2353@tucnak> <72df07f9-9634-4a05-d2dc-e8f0fdd40bd0@gmail.com> <20171219175815.GV2353@tucnak> <148e0211-7ebf-acb7-75d5-4538399ac349@gmail.com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, Dec 19, 2017 at 11:19:44AM -0700, Martin Sebor wrote:
> On 12/19/2017 10:58 AM, Jakub Jelinek wrote:
> > On Tue, Dec 19, 2017 at 10:49:07AM -0700, Martin Sebor wrote:
> > > Can the math be moved into inform_n (and warning_n) itself?
> >
> > No. I'm against having dozens of inform_n and warning_n etc.
>
> The question/suggestion is to change the existing inform_n and
> warning_n functions to do the math instead of having each caller
> do it. (I.e., not add any more overloads.)
The "math" is a mapping from some type (in this case UHWI) to
some other type (int, used by our *_n APIs), so that it gives the
same plural forms for known translations.
Are you suggesting we change the type of the *_n APIs to UHWI
instead? What if the caller needs something different? E.g.
wide_int, widest_int, offset_int, __int128, whatever else?
Jakub