From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 48195 invoked by alias); 29 Sep 2017 18:22:51 -0000 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 Received: (qmail 48185 invoked by uid 89); 29 Sep 2017 18:22:51 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.4 required=5.0 tests=BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=ham version=3.3.2 spammy=Bernd, msgid, Hx-languages-length:3015 X-HELO: mail-it0-f49.google.com Received: from mail-it0-f49.google.com (HELO mail-it0-f49.google.com) (209.85.214.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 29 Sep 2017 18:22:49 +0000 Received: by mail-it0-f49.google.com with SMTP id e134so754174ite.3 for ; Fri, 29 Sep 2017 11:22:49 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=zIegL99pvZdVRnvZsCg1LhPULTmJkC2byn5jUsRPEHg=; b=k5a+k3q/4kmYKAjz70rv+cSnnJKNyGedewW/bcyzxjDL5AoULbrbkZCEP958EMX8uv 2kL23JrbTjblBbvWJqmGKefTezFY8xpvquBup63dD9ZxmkUbjDT+dMUi3iwON0VX/XMe oCdv5BkHqcW7qY+5b9mIbk+NkJbpKEEjcGVxvYAoQS8v+aKVnCpNi0ZoSsxH3M1DKSNm by/HZLJ7+Q+jRTzEgwhQRWjVKI+EFU4bXDGf2og4IPAbv82fsfbXciOhgTe6yB3zJPb2 6qD6MRAWQllXncRkJV/l438rcfAfDnnZyT/BGlxOO+ZidiOnA/GEeo3M/jY6conQJRrX STyg== X-Gm-Message-State: AHPjjUgje5NxIQrdCIYGD0nnB1qd4d7MUrHN8OvGzncL880+C3Iy9g4f 5WSoTVnl4yoADLy3IoWogZnoKw== X-Google-Smtp-Source: AOwi7QDzl+xgdAINLSa2iQs7xRWryoWVD5WqXgU9m14mbm1xE+wK5rkegjNoia+UU5NZRX2b4W/RQg== X-Received: by 10.36.192.136 with SMTP id u130mr8361325itf.143.1506709367607; Fri, 29 Sep 2017 11:22:47 -0700 (PDT) Received: from [192.168.1.100] (173-230-163-230.cable.teksavvy.com. [173.230.163.230]) by smtp.googlemail.com with ESMTPSA id k10sm1950207iod.56.2017.09.29.11.22.46 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 29 Sep 2017 11:22:46 -0700 (PDT) Subject: Re: Patch that fix PR80188 To: Bernd Edlinger Cc: "gcc-patches@gcc.gnu.org" References: From: nick Message-ID: <3292bd48-c676-2f91-0630-4fed64b5b8b7@gmail.com> Date: Fri, 29 Sep 2017 18:22:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-IsSubscribed: yes X-SW-Source: 2017-09/txt/msg01986.txt.bz2 On 2017-09-29 01:48 PM, Bernd Edlinger wrote: > > Greetings, > > > > I don't have write access so can someone commit this bug fix as it > > fixes, > > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80188. > > > > Author: Nicholas Krause > > Date: Fri Sep 29 11:39:46 2017 -0400 > > > > This patch fixes, https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80188 > > which reports that the char* pointer reason is not being translated > > properly when the error message from the function, > > maybe_complain_about_tail_call arises. Fix it by wrapping it in the > > N_ macro to translate to the proper language of the user. No new > > test cases are required due to the triviality of the bug. > > > > diff --git a/gcc/calls.c b/gcc/calls.c > > index 6bd025ed197..cfdd6b2cf6b 100644 > > --- a/gcc/calls.c > > +++ b/gcc/calls.c > > @@ -1516,7 +1516,7 @@ maybe_complain_about_tail_call (tree call_expr, > const char *reason) > > if (!CALL_EXPR_MUST_TAIL_CALL (call_expr)) > > return; > > > > - error_at (EXPR_LOCATION (call_expr), "cannot tail-call: %s", reason); > > + error_at (EXPR_LOCATION (call_expr), "cannot tail-call: %s", > N_(reason)); > > } > > > > /* Fill in ARGS_SIZE and ARGS array based on the parameters found in > > > > Thanks, > > > > Nick > > No, this does obviously not fix the problem. > > The main problem is that po/gcc.pot does contain the "cannot tail-call" > string but not the various reasons for it, so the translators have > noting to translate. > > You should wrap all strings that need to be translated in N_, > and where you do use N_ you should use _(reason). > So that make -C gcc gcc.pot picks them up when the gcc.pot is created, > which is only done on request, but it would be good to check > that the gcc.pot file looks right with your patch at least. > So I understand correctly the gcc.pot is used for something and that the cannot tail call but not the various reasons for it. So this N_ marco is a way to get debugging or symbol information or something more like: error_at (EXPR_LOCATION (call_expr),N_("cannot tail-call: %s"), gcc.pot for that line is: #: calls.c:1516 ▸ prev-zlib/ |16905 #, gcc-internal-format, gfc-internal-format ▸ stage1-fixincludes/ |16906 msgid "cannot tail-call: %s" ▸ stage1-gcc/ |16907 msgstr "" This seems wrong to me but I am new so double checking would be nice. Or our to talking about all lines in gcc.pot requiring something similar? I am a bit confused by is it just this area or all of the output that needs fixing in gcc.pot? > But most importantly a patch like this is worthless when it was not > tested, so the minimum is you have to state that you did bootstrap with > your patch and the test suite did not produce any new failures > that were not there without your patch. > > I ran the test suite and got no known new failures. I assumed that I didn't need to report that but if so that's fine. This is something I always do if possible. Thanks for the quick reply, Nick > Bernd. >