[PATCH][aarch64] Fix error calls in aarch64 code so they can be tranlated
Steve Ellcey
sellcey@cavium.com
Wed Sep 20 23:36:00 GMT 2017
On Tue, 2017-09-19 at 10:49 -0600, Martin Sebor wrote:
> On 09/19/2017 09:54 AM, Steve Ellcey wrote:
> > On Tue, 2017-09-19 at 09:50 +0200, Frédéric Marchal wrote:
> > >Â
> > > >
> > > > Â Â Â error (is_pragma
> > > > Â Â Â Â Â Â Â Â Â Â ? G_("missing name in %<#pragma target\(\"%s=\")%>")
> > > > Â Â Â Â Â Â Â Â Â Â : G_("missing name in %<target(\"%s=\")%>
> > > > attribute"),
> > > > Â Â Â Â Â Â Â Â Â Â "arch");
> > > >
> > > > The additional benefit of this approach is that it would also make
> > > > the quoting consistent with what seems to be the prevailing style
> > > > of these sorts of messages.  (It would be nice to eventually
> > > > converge on the same style/quoting and phrasing across all back
> > > > and front ends.)
> > > Indeed! That's even better as the message uses words the user sees in the
> > > source code whatever his/her locale language is.
So I am looking at redoing the error messages and I am trying to decide
between two forms.
Make pragma/attribute part of the non-translatable string by showing the
pragma and/or attribute syntax ast it would be in the C/C++ code (what about
Fortran or Ada?).
error (is_pragma
 ? G_("missing architecture name in %<#pragma GCC target (\"arch=string\")%>")
 : G_("missing architecture name in %<__attribute__ ((target(\"arch=string\")))
%>"));
Or include them in the part that does get translated and include less of
what is actually in the text of the file being compiled.
error (is_pragma
 ? G_("missing architecture name in %<target (\"arch=string\")%> pragma")
 : G_("missing architecture name in %<target(\"arch=string\")%> attribute"));
Opinions?
Steve Ellcey
sellcey@cavium.com
More information about the Gcc-patches
mailing list