This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C PATCH] Improve warn msg (PR c/43395)
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Fri, 2 May 2014 17:01:18 +0000
- Subject: Re: [C PATCH] Improve warn msg (PR c/43395)
- Authentication-results: sourceware.org; auth=none
- References: <20140429211714 dot GC11802 at redhat dot com>
On Tue, 29 Apr 2014, Marek Polacek wrote:
> It's correct to warn about returning an address of a local label,
> but it's clumsy to say it's "local variable. We can easily distinguish
> between a label and a variable.
>
> Regtested/bootstrapped on x86_64-linux, ok for trunk?
You always need to have complete sentences in diagnostics for the sake of
translation. Thus, you need two separate warning_at calls, one with each
version of the message. (Using ? : for the whole format string isn't
sufficient; I think xgettext only extracts one of the two alternatives for
translation if you do that.)
--
Joseph S. Myers
joseph@codesourcery.com