This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Java: Prepare for %q, %< and %> in diagnostic messages
> >> That, and tracing the data flow and making sure that the string is
> >> passed through _() exactly once.
> >
> > Thanks. I think that part is taken care of
> > already - parse_error_context() and parse_warning_context()
> > call issue_error_warning_from_context(), which calls
> > warning() or error() in the core GCC framework, which
> > then ensures that the translation is done only once.
>
> It does do that, but I think it does it too late. [I'm not totally
> sure about this, because I cannot find the definition of java_error().]
> The call to _() [aka gettext()] has to happen _before_ any other
> transformations are done to the string, or the string won't match what
> was put into the translation database.
>
> Note also that java_lex_error() needs similar treatment.
Crumbs! I saw this message just moments after I committed
my changes. Sorry about that.
However, I do not see an easy way out of this without
perhaps redoing the error reporting bits (parse_*_context)
and that might be too much for stage3...
Do you want me to revert my commit or shall I proceed
for the moment with using the new quoting style in the
messages?
Thanks,
Ranjit.
--
Ranjit Mathew Email: rmathew AT gmail DOT com
Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/