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

            Bug ID: 90012
           Summary: untranslateable placeholder in expressionsem.c
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: d
          Assignee: ibuclaw at gdcproject dot org
          Reporter: roland.illig at gmx dot de
  Target Milestone: ---

From expressionsem.c:

const char *p = v->isParameter() ? "parameter" : "local";
e->error("cannot take address of scope %s %s in @safe function %s",
    p, v->toChars(), sc->func->toChars());

As a translator I have no chance of translating the first %s since it is passed
literally.

Please add a check to the diagnostics linter that can detect this case.
Detecting this case is possible since:

* p is only ever assigned a string literal
* that string literal is never passed through _(...)
* that string literal is passed as a replacement for a %s into a message

Translating GCC is a huge amount of work. If only 1% of the messages is broken
like this, this means 130 bug reports. That 1% is a pretty good estimate, based
on my experience. I'd like that rate to be in the order of 0.1%.

Reply via email to