This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/52726] New: Composed error message will not get translated
- From: "goeran at uddeborg dot se" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 26 Mar 2012 16:07:38 +0000
- Subject: [Bug target/52726] New: Composed error message will not get translated
- Auto-submitted: auto-generated
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);