* substring-locations.h (format_warning_va): Formatting fix for
commit7ac1c1d7826e4593c93c4913967cbda3ead9ba63
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Mar 2018 19:04:58 +0000 (2 19:04 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 2 Mar 2018 19:04:58 +0000 (2 19:04 +0000)
tree9e9f74834008088fe0782398fb88b476022001a6
parent50009cd987400d2088249df59bef787a872a388a
* substring-locations.h (format_warning_va): Formatting fix for
ATTRIBUTE_GCC_DIAG.
(format_warning_at_substring): Fix up ATTRIBUTE_GCC_DIAG second
argument.
(format_warning_n_va, format_warning_at_substring_n): New prototypes.
* substring-locations.c: Include intl.h.
(format_warning_va): Turned into small wrapper around
format_warning_n_va, renamed to ...
(format_warning_n_va): ... this, add N and PLURAL_GMSGID arguments,
rename GMSGID to SINGULAR_GMSGID, if SINGULAR_GMSGID != PLURAL_GMSGID,
use ngettext.
(format_warning_at_substring_n): New function.
* gimple-ssa-sprintf.c: Remove GCC diagnostic ignored pragma.
(fmtwarn): Add ATTRIBUTE_GCC_DIAG.  Turn into a copy of
format_warning_at_substring with just a shorter name instead of
const function pointer.
(fmtwarn_n): New function.
(maybe_warn, format_directive, parse_directive): Use fmtwarn_n where
appropriate, get rid of all the fmtstr temporaries, move conditionals
with G_() wrapped string literals directly into fmtwarn arguments,
cast dir.len to (int), formatting fixes.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@258154 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/gimple-ssa-sprintf.c
gcc/substring-locations.c
gcc/substring-locations.h