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

--- Comment #3 from Roland Illig <roland.illig at gmx dot de> ---
(In reply to Daniel Santos from comment #2)
> Yes, this is mine.  Does this only become untranslatable when feature is
> "static call chains"?

In German, this might result in:

%<-mcall-ms2sysv-xlogues%> ist nicht mit static call chains kompatibel

This would be a change of language in the middle of the sentence without any
indication. Therefore yes, I consider it impossible to translate.

> But given that, what would be the ideal way to present this?

Two variants of the warning:

static void warn_once_call_ms2sysv_xlogues (const char *feature, bool q)
{
  static bool warned_once = false;
  if (warned_once)
    return;
  warned_once = true;

  if (q)
    {
      /* TRANSLATORS: %qs is either a command line option or the name of a
       * built-in function. */
      warning (0, "%<-mcall-ms2sysv-xlogues%> is not compatible with %qs",
               feature);
    }
  else
    {
      warning (0, "%<-mcall-ms2sysv-xlogues%> is not compatible with "
                  "nested functions");
    }
}

Either way, it's strange that the "feature" parameter is not used at all in the
!q case. That's only complicated because of the warned_once variable. If it
were possible to extract the warned_once variable out of this function, the
variant for nested functions could be called directly.

Reply via email to