From patchwork Sat Nov 5 01:47:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 123726 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 8DA44B70C2 for ; Sat, 5 Nov 2011 12:47:37 +1100 (EST) Received: (qmail 6993 invoked by alias); 5 Nov 2011 01:47:33 -0000 Received: (qmail 6982 invoked by uid 22791); 5 Nov 2011 01:47:30 -0000 X-SWARE-Spam-Status: No, hits=-7.0 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, SPF_HELO_PASS, TW_TM X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 05 Nov 2011 01:47:11 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id pA51lAja026992 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 4 Nov 2011 21:47:10 -0400 Received: from pebble.twiddle.home (vpn-224-198.phx2.redhat.com [10.3.224.198]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id pA51lAsH004740; Fri, 4 Nov 2011 21:47:10 -0400 Message-ID: <4EB4959D.1000502@redhat.com> Date: Fri, 04 Nov 2011 18:47:09 -0700 From: Richard Henderson User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110928 Fedora/3.1.15-1.fc14 Thunderbird/3.1.15 MIME-Version: 1.0 To: Paolo Carlini CC: GCC Patches , Jason Merrill , Torvald Riegel Subject: Re: [trans-mem] Avoid ICE with transaction expressions vs constant expressions. References: <4EB484B2.6010409@redhat.com> <4EB4892D.1080001@oracle.com> In-Reply-To: <4EB4892D.1080001@oracle.com> X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org On 11/04/2011 05:54 PM, Paolo Carlini wrote: > ... isn't translated correctly. Maybe better wrapping the strings in G_(). Ah, right. Fixed here, and the place I copied it from. r~ diff --git a/gcc/cp/parser.c b/gcc/cp/parser.c index 7a7cfe8..b6ac918 100644 --- a/gcc/cp/parser.c +++ b/gcc/cp/parser.c @@ -26665,10 +26665,10 @@ cp_parser_transaction_expression (cp_parser *parser, enum rid keyword) if (!flag_tm) error (keyword == RID_TRANSACTION_RELAXED - ? "%<__transaction_relaxed%> without transactional memory " - "support enabled" - : "%<__transaction_atomic%> without transactional memory " - "support enabled"); + ? G_("%<__transaction_relaxed%> without transactional memory " + "support enabled") + : G_("%<__transaction_atomic%> without transactional memory " + "support enabled")); token = cp_parser_require_keyword (parser, keyword, (keyword == RID_TRANSACTION_ATOMIC ? RT_TRANSACTION_ATOMIC diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c index e75589e..d1967ee 100644 --- a/gcc/cp/semantics.c +++ b/gcc/cp/semantics.c @@ -4983,11 +4983,11 @@ begin_transaction_stmt (location_t loc, tree *pcompound, int flags) if (flag_tm) add_stmt (r); else - error_at (loc, ((flags & TM_STMT_ATTR_RELAXED) != 0 ? - "%<__transaction_relaxed%> without transactional memory " - "support enabled" - : "%<__transaction_atomic%> without transactional memory " - "support enabled")); + error_at (loc, ((flags & TM_STMT_ATTR_RELAXED) != 0 + ? G_("%<__transaction_relaxed%> without " + "transactional memory support enabled") + : G_("%<__transaction_atomic%> without " + "transactional memory support enabled"))); TRANSACTION_EXPR_BODY (r) = push_stmt_list (); return r;