From: David Malcolm Date: Sat, 11 Mar 2017 01:57:11 +0000 (+0000) Subject: Simplify uses of "%<%s%>" to "%qs" (PR translation/79848) X-Git-Tag: upstream/12.2.0~40739 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2f6f187a86652b0a1d8bac2eda09e25b515c2f46;p=platform%2Fupstream%2Fgcc.git Simplify uses of "%<%s%>" to "%qs" (PR translation/79848) 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. Convert _ to G_ to avoid double translation. From-SVN: r246068 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 70550d0..1914004 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,13 @@ 2017-03-10 David Malcolm + PR translation/79848 + * ipa-devirt.c (warn_types_mismatch): Simplify uses of "%<%s%>" to + "%qs". + * ipa-pure-const.c (suggest_attribute): Likewise. Convert _ + to G_ to avoid double translation. + +2017-03-10 David Malcolm + PR translation/79923 * auto-profile.c (get_combined_location): Convert leading character of diagnostics to lower case and remove trailing period. diff --git a/gcc/c-family/ChangeLog b/gcc/c-family/ChangeLog index eec9a53..0a7fef1 100644 --- a/gcc/c-family/ChangeLog +++ b/gcc/c-family/ChangeLog @@ -1,5 +1,11 @@ 2017-03-10 David Malcolm + PR translation/79848 + * c-format.c (check_format_string): Simplify uses of "%<%s%>" to + "%qs". + +2017-03-10 David Malcolm + PR c/79921 * c-indentation.c (warn_for_misleading_indentation): Remove parens from inform's message, so that xgettext can locate it. diff --git a/gcc/c-family/c-format.c b/gcc/c-family/c-format.c index 81be935..400eb66 100644 --- a/gcc/c-family/c-format.c +++ b/gcc/c-family/c-format.c @@ -207,7 +207,7 @@ check_format_string (tree fntype, unsigned HOST_WIDE_INT format_num, { /* We expected a char but found an extended string type. */ if (is_objc_sref) - error ("found a %<%s%> reference but the format argument should" + error ("found a %qs reference but the format argument should" " be a string", format_name (gcc_objc_string_format_type)); else error ("found a %qT but the format argument should be a string", @@ -220,7 +220,7 @@ check_format_string (tree fntype, unsigned HOST_WIDE_INT format_num, /* We expect a string object type as the format arg. */ if (is_char_ref) { - error ("format argument should be a %<%s%> reference but" + error ("format argument should be a %qs reference but" " a string was found", format_name (expected_format_type)); *no_add_attrs = true; return false; @@ -242,7 +242,7 @@ check_format_string (tree fntype, unsigned HOST_WIDE_INT format_num, return true; else { - error ("format argument should be a %<%s%> reference", + error ("format argument should be a %qs reference", format_name (expected_format_type)); *no_add_attrs = true; return false; diff --git a/gcc/c/ChangeLog b/gcc/c/ChangeLog index c461c6d..df4f65d 100644 --- a/gcc/c/ChangeLog +++ b/gcc/c/ChangeLog @@ -1,3 +1,10 @@ +2017-03-10 David Malcolm + + PR translation/79848 + * c-decl.c (declspecs_add_type): Simplify uses of "%<%s%>" to + "%qs". + * c-parser.c (c_parser_oacc_shape_clause): Likewise. + 2017-03-09 Marek Polacek PR sanitizer/79757 diff --git a/gcc/c/c-decl.c b/gcc/c/c-decl.c index 130ffa6..0f10208 100644 --- a/gcc/c/c-decl.c +++ b/gcc/c/c-decl.c @@ -10517,37 +10517,37 @@ declspecs_add_type (location_t loc, struct c_declspecs *specs, str = "_Decimal128"; if (specs->long_long_p) error_at (loc, - ("both % and %<%s%> in " + ("both % and %qs in " "declaration specifiers"), str); if (specs->long_p) error_at (loc, - ("both % and %<%s%> in " + ("both % and %qs in " "declaration specifiers"), str); else if (specs->short_p) error_at (loc, - ("both % and %<%s%> in " + ("both % and %qs in " "declaration specifiers"), str); else if (specs->signed_p) error_at (loc, - ("both % and %<%s%> in " + ("both % and %qs in " "declaration specifiers"), str); else if (specs->unsigned_p) error_at (loc, - ("both % and %<%s%> in " + ("both % and %qs in " "declaration specifiers"), str); else if (specs->complex_p) error_at (loc, - ("both % and %<%s%> in " + ("both % and %qs in " "declaration specifiers"), str); else if (specs->saturating_p) error_at (loc, - ("both %<_Sat%> and %<%s%> in " + ("both %<_Sat%> and %qs in " "declaration specifiers"), str); else if (i == RID_DFLOAT32) @@ -10575,7 +10575,7 @@ declspecs_add_type (location_t loc, struct c_declspecs *specs, str = "_Accum"; if (specs->complex_p) error_at (loc, - ("both % and %<%s%> in " + ("both % and %qs in " "declaration specifiers"), str); else if (i == RID_FRACT) diff --git a/gcc/c/c-parser.c b/gcc/c/c-parser.c index 1394f18..46883e2 100644 --- a/gcc/c/c-parser.c +++ b/gcc/c/c-parser.c @@ -11820,7 +11820,7 @@ c_parser_oacc_shape_clause (c_parser *parser, omp_clause_code kind, if (c == boolean_true_node) { warning_at (loc, 0, - "%<%s%> value must be positive", str); + "%qs value must be positive", str); expr = integer_one_node; } diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 92b430d..ac7a46e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2017-03-10 David Malcolm + + PR translation/79848 + * decl.c (grokfndecl): Simplify uses of "%<%s%>" to "%qs". + 2017-03-10 Jason Merrill PR c++/79960 - alias templates and partial ordering diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index bf6f0eb..0ecd30b 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -8777,13 +8777,13 @@ grokfndecl (tree ctype, if (long_long_unsigned_p) { if (cpp_interpret_int_suffix (parse_in, suffix, strlen (suffix))) - warning (0, "integer suffix %<%s%>" + warning (0, "integer suffix %qs" " shadowed by implementation", suffix); } else if (long_double_p) { if (cpp_interpret_float_suffix (parse_in, suffix, strlen (suffix))) - warning (0, "floating point suffix %<%s%>" + warning (0, "floating point suffix %qs" " shadowed by implementation", suffix); } } @@ -11839,7 +11839,7 @@ grokdeclarator (const cp_declarator *declarator, headers because glibc uses them. */; else if (name) pedwarn (input_location, OPT_Wpedantic, - "ISO C++ forbids flexible array member %<%s%>", name); + "ISO C++ forbids flexible array member %qs", name); else pedwarn (input_location, OPT_Wpedantic, "ISO C++ forbids flexible array members"); diff --git a/gcc/ipa-devirt.c b/gcc/ipa-devirt.c index 0e5eb85..0c74c87 100644 --- a/gcc/ipa-devirt.c +++ b/gcc/ipa-devirt.c @@ -1139,7 +1139,7 @@ warn_types_mismatch (tree t1, tree t2, location_t loc1, location_t loc2) if (name1 && name2 && strcmp (name1, name2)) { inform (loc_t1, - "type name %<%s%> should match type name %<%s%>", + "type name %qs should match type name %qs", name1, name2); if (loc_t2_useful) inform (loc_t2, diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index 5cc2002..3781171 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -184,9 +184,9 @@ 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%>" - " if it is known to return normally"), attrib_name); + ? G_("function might be candidate for attribute %qs") + : G_("function might be candidate for attribute %qs" + " if it is known to return normally"), attrib_name); return warned_about; }