On Tue, 2017-12-19 at 18:58 +0100, Jakub Jelinek wrote: > On Tue, Dec 19, 2017 at 10:49:07AM -0700, Martin Sebor wrote: > > Can the math be moved into inform_n (and warning_n) itself? > > No. I'm against having dozens of inform_n and warning_n etc. > overloads, it is already bad enough we have so many diagnostics > entry points now that putting breakpoints on them is so hard.
FWIW, I added a "break-on-diagnostic" command to our .gdbinit script, in case that helps: https://gcc.gnu.org/ml/gcc-patches/2017-11/msg01382.html > Those functions just have int, and we can have > perhaps some other function (plural_count or some better name) > that is inline and overloaded on the various types and can be used > if the count isn't int. > > As for gimple-ssa-sprintf.c, there are several other cases that > want a plural form, but I haven't changed them because > format_warning_at_substring doesn't have _n suffixed variant. > > Jakub