In English, the following idiom is correct: warning_at (loc, opt, (integer_onep (range[0]) ? G_("%K%qD writing %E byte into a region " "of size %E overflows the destination") : G_("%K%qD writing %E bytes into a region " "of size %E overflows the destination")), In other languages, this fails. - In French, 0 and 1 both use the singular. - In Polish, Arabic and several other languages there are up to 6 plural forms. See http://www.unicode.org/cldr/charts/29/supplemental/language_plural_rules.html
Confirmed.
Patch: https://gcc.gnu.org/ml/gcc-patches/2018-03/msg01548.html
Fixed via r258983.
Author: msebor Date: Fri Mar 30 21:04:06 2018 New Revision: 258983 URL: https://gcc.gnu.org/viewcvs?rev=258983&root=gcc&view=rev Log: PR tree-optimization/84818 - integer_onep must not be used for i18n gcc/ChangeLog: PR tree-optimization/84818 * builtins.c (check_access): Use warning_n. Modified: trunk/gcc/ChangeLog trunk/gcc/builtins.c