re PR translation/79183 (Hard coded plurals in gimple-ssa-sprintf.c:2050)
PR translation/79183 * gimple-ssa-sprintf.c (format_directive): Use inform_n instead of inform where appropriate. From-SVN: r270438
This commit is contained in:
parent
1b73c7ef7c
commit
ff146a59dd
4 changed files with 49 additions and 13 deletions
|
@ -1,3 +1,9 @@
|
|||
2019-04-18 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
PR translation/79183
|
||||
* gimple-ssa-sprintf.c (format_directive): Use inform_n instead of
|
||||
inform where appropriate.
|
||||
|
||||
2019-04-18 Richard Biener <rguenther@suse.de>
|
||||
|
||||
* tree.c (get_qualified_type): Put found type variants at the
|
||||
|
|
|
@ -2513,7 +2513,24 @@ merge_decls (tree newdecl, tree olddecl, tree newtype, tree oldtype)
|
|||
{
|
||||
tree remove = TREE_TYPE (newdecl);
|
||||
if (TYPE_MAIN_VARIANT (remove) == remove)
|
||||
gcc_assert (TYPE_NEXT_VARIANT (remove) == NULL_TREE);
|
||||
{
|
||||
gcc_assert (TYPE_NEXT_VARIANT (remove) == NULL_TREE);
|
||||
/* If remove is the main variant, no need to remove that
|
||||
from the list. One of the DECL_ORIGINAL_TYPE
|
||||
variants, e.g. created for aligned attribute, might still
|
||||
refer to the newdecl TYPE_DECL though, so remove that one
|
||||
in that case. */
|
||||
if (DECL_ORIGINAL_TYPE (newdecl)
|
||||
&& DECL_ORIGINAL_TYPE (newdecl) != remove)
|
||||
for (tree t = TYPE_MAIN_VARIANT (DECL_ORIGINAL_TYPE (newdecl));
|
||||
; t = TYPE_MAIN_VARIANT (t))
|
||||
if (TYPE_NAME (TYPE_NEXT_VARIANT (t)) == newdecl)
|
||||
{
|
||||
TYPE_NEXT_VARIANT (t)
|
||||
= TYPE_NEXT_VARIANT (TYPE_NEXT_VARIANT (t));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
for (tree t = TYPE_MAIN_VARIANT (remove); ;
|
||||
t = TYPE_NEXT_VARIANT (t))
|
||||
|
|
|
@ -2133,7 +2133,24 @@ next_arg:;
|
|||
{
|
||||
tree remove = TREE_TYPE (newdecl);
|
||||
if (TYPE_MAIN_VARIANT (remove) == remove)
|
||||
gcc_assert (TYPE_NEXT_VARIANT (remove) == NULL_TREE);
|
||||
{
|
||||
gcc_assert (TYPE_NEXT_VARIANT (remove) == NULL_TREE);
|
||||
/* If remove is the main variant, no need to remove that
|
||||
from the list. One of the DECL_ORIGINAL_TYPE
|
||||
variants, e.g. created for aligned attribute, might still
|
||||
refer to the newdecl TYPE_DECL though, so remove that one
|
||||
in that case. */
|
||||
if (tree orig = DECL_ORIGINAL_TYPE (newdecl))
|
||||
if (orig != remove)
|
||||
for (tree t = TYPE_MAIN_VARIANT (orig); ;
|
||||
t = TYPE_MAIN_VARIANT (t))
|
||||
if (TYPE_NAME (TYPE_NEXT_VARIANT (t)) == newdecl)
|
||||
{
|
||||
TYPE_NEXT_VARIANT (t)
|
||||
= TYPE_NEXT_VARIANT (TYPE_NEXT_VARIANT (t));
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
for (tree t = TYPE_MAIN_VARIANT (remove); ;
|
||||
t = TYPE_NEXT_VARIANT (t))
|
||||
|
|
|
@ -3016,12 +3016,10 @@ format_directive (const sprintf_dom_walker::call_info &info,
|
|||
help the user figure out how big a buffer they need. */
|
||||
|
||||
if (min == max)
|
||||
inform (callloc,
|
||||
(min == 1
|
||||
? G_("%qE output %wu byte into a destination of size %wu")
|
||||
: G_("%qE output %wu bytes into a destination of size "
|
||||
"%wu")),
|
||||
info.func, min, info.objsize);
|
||||
inform_n (callloc, min,
|
||||
"%qE output %wu byte into a destination of size %wu",
|
||||
"%qE output %wu bytes into a destination of size %wu",
|
||||
info.func, min, info.objsize);
|
||||
else if (max < HOST_WIDE_INT_MAX)
|
||||
inform (callloc,
|
||||
"%qE output between %wu and %wu bytes into "
|
||||
|
@ -3044,11 +3042,9 @@ format_directive (const sprintf_dom_walker::call_info &info,
|
|||
of printf with no destination size just print the computed
|
||||
result. */
|
||||
if (min == max)
|
||||
inform (callloc,
|
||||
(min == 1
|
||||
? G_("%qE output %wu byte")
|
||||
: G_("%qE output %wu bytes")),
|
||||
info.func, min);
|
||||
inform_n (callloc, min,
|
||||
"%qE output %wu byte", "%qE output %wu bytes",
|
||||
info.func, min);
|
||||
else if (max < HOST_WIDE_INT_MAX)
|
||||
inform (callloc,
|
||||
"%qE output between %wu and %wu bytes",
|
||||
|
|
Loading…
Add table
Reference in a new issue