From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28041 invoked by alias); 27 Jul 2014 19:45:08 -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 28025 invoked by uid 89); 27 Jul 2014 19:45:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 X-HELO: mail-out.m-online.net Received: from mail-out.m-online.net (HELO mail-out.m-online.net) (212.18.0.9) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Sun, 27 Jul 2014 19:45:05 +0000 Received: from frontend1.mail.m-online.net (frontend1.mail.intern.m-online.net [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 3hLvkQ0PFHz3hhpj; Sun, 27 Jul 2014 21:45:01 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3hLvkP6nglz7S6Ry; Sun, 27 Jul 2014 21:45:01 +0200 (CEST) Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id hang9FERQtXl; Sun, 27 Jul 2014 21:45:01 +0200 (CEST) X-Auth-Info: j1Sjaee4EJEim6S1zHr9wqQ0VAmQJBmb4bUPlnK6ynI= Received: from igel.home (ppp-188-174-159-153.dynamic.mnet-online.de [188.174.159.153]) by mail.mnet-online.de (Postfix) with ESMTPA; Sun, 27 Jul 2014 21:45:01 +0200 (CEST) Received: by igel.home (Postfix, from userid 1000) id DE0CD2C3839; Sun, 27 Jul 2014 21:45:00 +0200 (CEST) From: Andreas Schwab To: Marc Glisse Cc: Richard Sandiford , gcc-patches@gcc.gnu.org Subject: Re: Warn when returning the address of a temporary (middle-end) v2 References: <87fvhmllc5.fsf@talisman.default> X-Yow: I want to TAKE IT HOME and DRESS IT UP in HOT PANTS!! Date: Sun, 27 Jul 2014 20:45:00 -0000 In-Reply-To: (Marc Glisse's message of "Sun, 27 Jul 2014 20:43:21 +0200 (CEST)") Message-ID: <87ha22twlf.fsf@igel.home> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.92 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-07/txt/msg01853.txt.bz2 Marc Glisse writes: > On Sun, 27 Jul 2014, Richard Sandiford wrote: > >> Marc Glisse writes: >>> + if (always_executed) >>> + msg = "function returns address of local variable"; >>> + else >>> + msg = "function may return address of local variable"; >> >> I think you need _(...) here, unless some magic makes that unnecessary now. > > I just tried to see how the magic happens when someone calls error_at, and > it goes through diagnostic_set_info, which contains: > > diagnostic_set_info_translated (diagnostic, _(gmsgid), args, location, kind); > > So I think the _(...) is already taken care of. But I don't know that code > at all and I could easily have looked at it wrong. If the msgid is not a direct argument of the diagnostic function you need to mark the string with N_(...). Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different."