On Tue, 15 Oct 2019, Richard Sandiford wrote:

> > No.  I'd expect the code generating the IR from GCC diagnostics should 
> > arrange for the message to be translated first (while in the case of 
> > __builtin_warning in user code, it would not be translated), and the code 
> > subsequently using the IR to use diagnostic_set_info_translated or 
> > functions that end up calling it without trying to translate.
> 
> Might be a daft question, but would we ever want GCC to introduce new
> calls before LTO streaming?  I guess we shouldn't assume that the user
> who builds the final object will be using the same locale.

In that case, we'd need the IR to distinguish warnings to be translated 
(store original message text and arguments) and warnings from user code 
not to be translated.

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to