aboutsummaryrefslogtreecommitdiff
path: root/gcc/gimple-ssa-sprintf.c
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2018-02-27 22:06:03 +0000
committerMartin Sebor <msebor@gcc.gnu.org>2018-02-27 15:06:03 -0700
commit1c89478aef3ef9576f40013c3969179b3189ee95 (patch)
tree8c1be1842ced105c7f3ce3afef09764b30ff037a /gcc/gimple-ssa-sprintf.c
parent76bd270a7df7dbf5a02046072947802365bb67f6 (diff)
downloadgcc-1c89478aef3ef9576f40013c3969179b3189ee95.zip
gcc-1c89478aef3ef9576f40013c3969179b3189ee95.tar.gz
gcc-1c89478aef3ef9576f40013c3969179b3189ee95.tar.bz2
PR translation/84207 - Hard coded plural in gimple-fold.c
gcc/ChangeLog: PR translation/84207 * diagnostic-core.h (warning_n, error_n, inform_n): Change n argument to unsigned HOST_WIDE_INT. * diagnostic.c (warning_n, error_n, inform_n): Ditto. (diagnostic_n_impl): Ditto. Handle arguments in excess of LONG_MAX. * gimple-ssa-sprintf.c (format_directive): Simplify inform_n call. * tree-ssa-strlen.c (maybe_diag_stxncpy_trunc): Use warning_n. From-SVN: r258044
Diffstat (limited to 'gcc/gimple-ssa-sprintf.c')
-rw-r--r--gcc/gimple-ssa-sprintf.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/gcc/gimple-ssa-sprintf.c b/gcc/gimple-ssa-sprintf.c
index 1189d9f..83d71f0 100644
--- a/gcc/gimple-ssa-sprintf.c
+++ b/gcc/gimple-ssa-sprintf.c
@@ -2952,10 +2952,7 @@ format_directive (const sprintf_dom_walker::call_info &info,
&& fmtres.range.likely < fmtres.range.max)
/* Some languages have special plural rules even for large values,
but it is periodic with period of 10, 100, 1000 etc. */
- inform_n (info.fmtloc,
- fmtres.range.likely > INT_MAX
- ? (fmtres.range.likely % 1000000) + 1000000
- : fmtres.range.likely,
+ inform_n (info.fmtloc, fmtres.range.likely,
"assuming directive output of %wu byte",
"assuming directive output of %wu bytes",
fmtres.range.likely);