This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: fix garbage in diagnostics
"Joseph S. Myers" <joseph@codesourcery.com> writes:
| On Sun, 30 Oct 2004, Gabriel Dos Reis wrote:
|
| > The recent conversion of the C++ front-end to use the new-style
| > quoting exposes a bug in c_parse_error(). That routine was wrong in
| > many respects. Fixed with this patch. I do not particularly like the
| > control flow in c_parser_error(), but the current patch is better than
| > nothing.
|
| That function is still wrong in many ways. I'll file separate bugs for my
| points in comment#7 in bug 17852.
I disagree with the part (1) of that comment. The C++ front-end
should uniformly use the format specifiers. It was wrong fro
c_parse_error() to use %s to display the
| This patch is deliberately disabling such translation of the messages from
| this function (both the string passed in and the strings in the function)
| as there was, and the marking of the strings in this function for
| translation?
The translation was broken before my patch -- it was saying
const char* string = _(msgid);
then went on string-catenating with other stuff.
The patch leaves it to error() to get the translated messages.
-- Gaby