https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90149

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dmalcolm at gcc dot gnu.org,
                   |                            |rguenth at gcc dot gnu.org

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Martin Sebor from comment #8)
> (In reply to Richard Biener from comment #6)
> 
> The trouble is that there is no way to tell whether
> 
>       error ("BIT_FIELD_REF of non-mode-precision operand");
> 
> is a user-facing error or an internal error not meant to be translated.  The
> #pragma GCC diagnostic ignored "-Wformat-diag" solution suppresses the
> warning but won't help translators.  The only ways to deal with that that
> comes to mind are either a new  inernal_error_and_continue() function or
> some special annotation in the format string to make it clear both to
> -Wformat-diag and to translators that the string isn't meant to be
> translated (or checked for translation problems).  Is there a preference for
> one or other approach?  Or some other solution I'm not thinking of?

Ah, so Roland pointed out the bug this was discussed.  I think his approach
is reasonable (keep the original message but prefix it with a localized
prefix).  I think it would be useful for translators to know whether
they are dealing with "internal" errors or regular errors.

IMHO the error calls in our IL checkers are abusive, they could have been
simple dumps to stderr for example.  It was just "convenient" to use
a disagnostic reporting routine here (largely historically convenient).

Reply via email to