[Bug driver/46617] New: String concatenation fools extraction for translation.

goeran at uddeborg dot se gcc-bugzilla@gcc.gnu.org
Tue Nov 23 12:08:00 GMT 2010


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46617

           Summary: String concatenation fools extraction for translation.
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: driver
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: goeran@uddeborg.se


In gcc-4.6-20101113 in gcc/gcc.c in main() there is this code:

  fatal_error ("-fuse-linker-plugin, but " LTOPLUGINSONAME " not found");

When extracting strings for translation, the extractor doesn't see this as one
long string, and does not know what to replace LTOPLUGINSONAME with.  The
result is that what winds up in the pot file is

  #: gcc.c:6830
  #, gcc-internal-format
  msgid "-fuse-linker-plugin, but "

Obviously incorrect.

As a simple fix, may I suggest to rewrite it using a percent substitution:

  fatal_error ("-fuse-linker-plugin, but %s not found", LTOPLUGINSONAME);



More information about the Gcc-bugs mailing list