On Thu, Mar 09, 2017 at 12:45:29PM -0500, David Malcolm wrote: > PR translation/79848 requests that uses of "%<%s%>" in diagnostic messages > be simplified to "%qs", presumably to make it easier for translators > to deal with them. > > This patch does this for all such strings found in the source tree. > > gcc/c-family/ChangeLog: > PR translation/79848 > * c-format.c (check_format_string): Simplify uses of "%<%s%>" to > "%qs". > > gcc/c/ChangeLog: > PR translation/79848 > * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to > "%qs". > * c-parser.c (c_parser_oacc_shape_clause): Likewise. > > gcc/cp/ChangeLog: > PR translation/79848 > * decl.c (grokfndecl): Simplify uses of "%<%s%>" to "%qs". > > gcc/ChangeLog: > PR translation/79848 > * ipa-devirt.c (warn_types_mismatch): Simplify uses of "%<%s%>" to > "%qs". > * ipa-pure-const.c (suggest_attribute): Likewise.
Mostly ok, just: > --- a/gcc/ipa-pure-const.c > +++ b/gcc/ipa-pure-const.c > @@ -184,8 +184,8 @@ suggest_attribute (int option, tree decl, bool > known_finite, > warning_at (DECL_SOURCE_LOCATION (decl), > option, > known_finite > - ? _("function might be candidate for attribute %<%s%>") > - : _("function might be candidate for attribute %<%s%>" > + ? _("function might be candidate for attribute %qs") > + : _("function might be candidate for attribute %qs" > " if it is known to return normally"), attrib_name); > return warned_about; I think we should replace _( with G_( here, we don't want to translate twice. Ok with that change. Jakub