+2017-12-19 Jakub Jelinek <jakub@redhat.com>
+
+ * gimple-ssa-sprintf.c (format_directive): Use inform_n instead of
+ inform with hardcoded english plural handling.
+
2017-12-18 Jeff Law <law@redhat.com>
PR tree-optimization/83477
if (warned && fmtres.range.min < fmtres.range.likely
&& fmtres.range.likely < fmtres.range.max)
- {
- inform (info.fmtloc,
- (1 == fmtres.range.likely
- ? G_("assuming directive output of %wu byte")
- : G_("assuming directive output of %wu bytes")),
+ /* 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,
+ "assuming directive output of %wu byte",
+ "assuming directive output of %wu bytes",
fmtres.range.likely);
- }
if (warned && fmtres.argmin)
{