From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12941 invoked by alias); 18 Nov 2009 02:17:37 -0000 Received: (qmail 12929 invoked by uid 22791); 18 Nov 2009 02:17:36 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-vw0-f181.google.com (HELO mail-vw0-f181.google.com) (209.85.212.181) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Nov 2009 02:16:33 +0000 Received: by vws11 with SMTP id 11so194078vws.0 for ; Tue, 17 Nov 2009 18:16:31 -0800 (PST) MIME-Version: 1.0 Received: by 10.220.122.90 with SMTP id k26mr6348996vcr.9.1258510591449; Tue, 17 Nov 2009 18:16:31 -0800 (PST) In-Reply-To: <4B025B89.6030500@oracle.com> References: <4B025B89.6030500@oracle.com> Date: Wed, 18 Nov 2009 02:50:00 -0000 Message-ID: <206fcf960911171816n1562a8dfl66b33b400def341e@mail.gmail.com> Subject: Re: [PATCH, PR c++/40892] Fix maybe_warn_cpp0x i18n problems From: Gabriel Dos Reis To: Shujing Zhao Cc: gcc-patches@gcc.gnu.org, Paolo Carlini Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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: 2009-11/txt/msg00901.txt.bz2 On Tue, Nov 17, 2009 at 2:15 AM, Shujing Zhao wrot= e: > Hi, > > This patch is to adjust the function maybe_warn_cpp0x to make the warning > messages can be extracted by exgettext for translation. As the commenter = of > pr40892 suggested, I have made two candidate patches. One is to pass an e= num > to this function and the other is pass the complete diagnostic text to it. > I'm not sure which one is better for trunk, so both of them are submitted= to > be selected. > Some of test cases are also changed to add the detailed error messages to > match the output messages. > Both of the candidates are tested on i686-pc-linux-gnu and the diagnostic > sentences can be extracted to gcc.pot by execute "make gcc.pot" at > objdir/gcc. > Which one is ok for trunk? The second -- the one with enums. I don't know whether it is my mailer or not, but make sure you get the formatting right. Thanks! -- Gaby > > Thanks > Pearly > > 2009-11-17 =A0Shujing Zhao =A0 > > =A0 =A0 =A0 =A0PR c++/40892 > =A0 =A0 =A0 =A0* error.c (maybe_warn_cpp0x): Move the diagnostic details = to the > =A0 =A0 =A0 =A0caller and use gmsgid as argument name. > =A0 =A0 =A0 =A0(maybe_warn_variadic_templates): Use the complete diagnost= ic text for > =A0 =A0 =A0 =A0easier translation. > =A0 =A0 =A0 =A0* call.c (reference_binding): Likewise. > =A0 =A0 =A0 =A0* decl.c (reshape_init_r, check_initializer, grokdeclarato= r): > =A0 =A0 =A0 =A0Likewise. > =A0 =A0 =A0 =A0* parser.c (cp_parser_primary_expression) > =A0 =A0 =A0 =A0(cp_parser_parenthesized_expression_list, cp_parser_new_in= itializer) > =A0 =A0 =A0 =A0(cp_parser_assignment_expression, cp_parser_condition) > =A0 =A0 =A0 =A0(cp_parser_jump_statement, cp_parser_mem_initializer) > =A0 =A0 =A0 =A0(cp_parser_simple_type_specifier, > cp_parser_elaborated_type_specifier) > =A0 =A0 =A0 =A0(cp_parser_enum_specifier, cp_parser_initializer, > =A0 =A0 =A0 =A0(cp_parser_pure_specifier, cp_parser_functional_cast): Lik= ewise. > > >