public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <bonzini@gnu.org>
To: Marco Poletti <poletti.marco@gmail.com>
Cc: "Joseph S. Myers" <joseph@codesourcery.com>,
	gdr@integrable-solutions.net,
	 	Gabriel Dos Reis <dosreis@gmail.com>,
	gcc-patches@gcc.gnu.org
Subject: Re: gcc/cp/pt.c: use ngettext() when needed
Date: Wed, 17 Feb 2010 23:23:00 -0000	[thread overview]
Message-ID: <f865508f1002171522q1f58844bve8b0fbbde5f431df@mail.gmail.com> (raw)
In-Reply-To: <ae2276fe1002171332i74fd4224k7f41d97e0bf0a4f8@mail.gmail.com>

On Wed, Feb 17, 2010 at 22:32, Marco Poletti <poletti.marco@gmail.com> wrote:
> 2010/2/17 Joseph S. Myers <joseph@codesourcery.com>:
>> 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.)
>>
>
> So it would be something like
>
> error_n(location_t,int,const char*,const char*, ...)
>
> ?

Yes, with ...

Thanks Joseph for pointing out location_t.  Also for warning_n you'd
need an extra argument for the option name, but that one function can
come later.

> Does the exgettext patch need some changes to reflect this change?

No.

Paolo

  reply	other threads:[~2010-02-17 23:23 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-17 15:23 Marco Poletti
2010-02-17 15:25 ` Marco Poletti
2010-02-17 17:06 ` Gabriel Dos Reis
2010-02-17 18:02   ` Marco Poletti
2010-02-17 18:29   ` Paolo Bonzini
2010-02-17 20:07     ` Marco Poletti
2010-02-17 21:26     ` Joseph S. Myers
2010-02-17 21:32       ` Marco Poletti
2010-02-17 23:23         ` Paolo Bonzini [this message]
2010-02-18 14:33           ` Marco Poletti
2010-02-18 14:40             ` Jakub Jelinek
2010-02-18 14:49               ` Marco Poletti
2010-02-22  9:38                 ` Marco Poletti
2010-02-24  6:47                   ` Shujing Zhao
2010-02-24  6:57                     ` Paolo Bonzini
2010-02-24  8:55                       ` Shujing Zhao
2010-02-24 10:22                         ` Paolo Bonzini
2010-02-26  7:30                     ` Gabriel Dos Reis
2010-02-26  7:31                       ` Marco Poletti
2010-02-26  9:32                         ` Gabriel Dos Reis
2010-02-26  9:43                           ` Paolo Bonzini
2010-02-26  9:56                             ` Gabriel Dos Reis
2010-02-26 10:03                               ` Jakub Jelinek
2010-02-26 10:04                                 ` Gabriel Dos Reis
2010-02-26 10:09                                   ` Shujing Zhao
2010-02-26 10:42                                     ` Paolo Bonzini
2010-02-26 10:43                                       ` Jakub Jelinek
2010-03-01 10:00                                         ` Shujing Zhao
2010-03-01 10:16                                           ` Shujing Zhao
2010-03-01 15:12                                             ` Gabriel Dos Reis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f865508f1002171522q1f58844bve8b0fbbde5f431df@mail.gmail.com \
    --to=bonzini@gnu.org \
    --cc=dosreis@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=gdr@integrable-solutions.net \
    --cc=joseph@codesourcery.com \
    --cc=poletti.marco@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).