[Bug translation/90163] untranslated placeholder in warn_once_call_ms2sysv_xlogues

2019-04-19 Thread roland.illig at gmx dot de
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90163

--- Comment #3 from Roland Illig  ---
(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.

[Bug translation/90163] untranslated placeholder in warn_once_call_ms2sysv_xlogues

2019-04-19 Thread daniel.santos at pobox dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90163

--- Comment #2 from Daniel Santos  ---
Yes, this is mine.  Does this only become untranslatable when feature is
"static call chains"?

iiuc, static call chains are only used with nested functions (a GNU C
extension) and closure functions -- is this correct?  So using the descriptor
"static call chains" is probably bad in the first place.  We might be able to
just change this to "nested functions".

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

This is one of those things that *could* be implemented but was initially
deemed to be more work than it would be worth.  It would be better to disable
-mcall-ms2sysv-xloguesthe for the affected functions, but this is pretty much
for Wine and, to my knowledge, we haven't encountered this error in the wild.

[Bug translation/90163] untranslated placeholder in warn_once_call_ms2sysv_xlogues

2019-04-18 Thread egallager at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=90163

Eric Gallager  changed:

   What|Removed |Added

 CC||daniel.santos at pobox dot com,
   ||egallager at gcc dot gnu.org

--- Comment #1 from Eric Gallager  ---
pretty sure Daniel Santos did this code