public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/52726] New: Composed error message will not get translated
@ 2012-03-26 16:14 goeran at uddeborg dot se
  0 siblings, 0 replies; only message in thread
From: goeran at uddeborg dot se @ 2012-03-26 16:14 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 52726
           Summary: Composed error message will not get translated
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: minor
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: goeran@uddeborg.se


In config/tilepro/tilepro.c there is this code

    output_operand_lossage ("invalid %%t operand '"
                HOST_WIDE_INT_PRINT_DEC "'", n);

Normally, the first argument of "output_operand_lossage" is extracted for
translation.  When using string concatenation in this way it fails however, and
only the first part, "invalid %%t operand '", will get extracted.  At run time
however, the concatenated string would be used, which will not be available in
the translation catalog.

A trivial workaround would be to compose the format string at run time:

    sprintf (buf, gettext("invalid %%%%t operand '%s'"),
HOST_WIDE_INT_PRINT_DEC);
    output_operand_lossage (buf, n);


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2012-03-26 16:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-26 16:14 [Bug target/52726] New: Composed error message will not get translated goeran at uddeborg dot se

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).