This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C PATCH] Improve warn msg (PR c/43395)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]