On 10/14/19 4:03 PM, Joseph Myers wrote:
How does this interact with translation?

My expectation would be that in user code, the message is taken literally
as-is; it is not looked up in the GCC message catalog even if it is
identical to some GCC diagnostic.  However, when used internally for GCC
diagnostics, they should be translated, meaning the translation for GCC
diagnostics using this mechanism should occur before the built-in call is
stored in the IR.

Right, that would make sense.  Does something make you think it will
be hard to do?


I note the patch has

+    return gimple_build_warning (stmt, OPT_Wnonnull,
+                                "operand null where non-null expected");

with the message not being marked for extraction for translation.

I suppose we'll need to make sure these strings are translated just
like for warning_at.  Come to think of it, how does it happen there?
Is it just via the  __gcc_*diag__  attributes?

Martin

PS Another unfinished part is handling different execution charsets
in the directive parser.

Reply via email to