From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1111 invoked by alias); 17 Feb 2010 21:26:08 -0000 Received: (qmail 1098 invoked by uid 22791); 17 Feb 2010 21:26:07 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_FAIL X-Spam-Check-By: sourceware.org Received: from mx20.gnu.org (HELO mx20.gnu.org) (199.232.41.8) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 17 Feb 2010 21:26:03 +0000 Received: from mail.codesourcery.com ([38.113.113.100]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NhrPF-00070m-73 for gcc-patches@gcc.gnu.org; Wed, 17 Feb 2010 16:26:01 -0500 Received: (qmail 19413 invoked from network); 17 Feb 2010 21:19:17 -0000 Received: from unknown (HELO digraph.polyomino.org.uk) (joseph@127.0.0.2) by mail.codesourcery.com with ESMTPA; 17 Feb 2010 21:19:17 -0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.69) (envelope-from ) id 1NhrIh-0004gl-RN; Wed, 17 Feb 2010 21:19:15 +0000 Date: Wed, 17 Feb 2010 21:26:00 -0000 From: "Joseph S. Myers" To: Paolo Bonzini cc: gdr@integrable-solutions.net, Gabriel Dos Reis , Marco Poletti , gcc-patches@gcc.gnu.org Subject: Re: gcc/cp/pt.c: use ngettext() when needed In-Reply-To: <4B7C3571.60808@gnu.org> Message-ID: References: <206fcf961002170906l1bdca005h3833890d35d7db5c@mail.gmail.com> <4B7C3571.60808@gnu.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-detected-operating-system: by mx20.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2010-02/txt/msg00699.txt.bz2 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