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

            Bug ID: 80188
           Summary: calls.c: reason argument to
                    maybe_complain_about_tail_call must be marked for
                    translation
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: translation
          Assignee: unassigned at gcc dot gnu.org
          Reporter: roland.illig at gmx dot de
  Target Milestone: ---

from calls.c:

static void
maybe_complain_about_tail_call (tree call_expr, const char *reason)
{
  ...
  error_at (EXPR_LOCATION (call_expr), "cannot tail-call: %s", reason);
}

The "reason" argument must be marked for translation using N_("..."), but is
not. For example:

    maybe_complain_about_tail_call (exp,
      "a callee-copied argument is"
      " stored in the current "
      " function's frame");

This means that the string "a callee-copied ..." is always given in English,
even if the rest of the diagnostic is given in German or some other language.

I don't know how to reproduce this particular diagnostic, but there should be a
test for it. When running this test in a non-English locale, the diagnostic
with mixed language will show up.

Reply via email to