aboutsummaryrefslogtreecommitdiff
path: root/gcc/substring-locations.h
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2018-03-02 20:04:58 +0100
committerJakub Jelinek <jakub@gcc.gnu.org>2018-03-02 20:04:58 +0100
commit346114b54da37792ec1759a1e76626eb4d3a5594 (patch)
tree9e9f74834008088fe0782398fb88b476022001a6 /gcc/substring-locations.h
parent892870f9f3ae0fc4486e372c3db0a83b739ca572 (diff)
downloadgcc-346114b54da37792ec1759a1e76626eb4d3a5594.zip
gcc-346114b54da37792ec1759a1e76626eb4d3a5594.tar.gz
gcc-346114b54da37792ec1759a1e76626eb4d3a5594.tar.bz2
substring-locations.h (format_warning_va): Formatting fix for ATTRIBUTE_GCC_DIAG.
* 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. From-SVN: r258154
Diffstat (limited to 'gcc/substring-locations.h')
-rw-r--r--gcc/substring-locations.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/gcc/substring-locations.h b/gcc/substring-locations.h
index 7c8a0ac..fca6fd3 100644
--- a/gcc/substring-locations.h
+++ b/gcc/substring-locations.h
@@ -80,13 +80,29 @@ extern bool format_warning_va (const substring_loc &fmt_loc,
location_t param_loc,
const char *corrected_substring,
int opt, const char *gmsgid, va_list *ap)
- ATTRIBUTE_GCC_DIAG (5,0);
+ ATTRIBUTE_GCC_DIAG (5, 0);
+
+extern bool format_warning_n_va (const substring_loc &fmt_loc,
+ location_t param_loc,
+ const char *corrected_substring,
+ int opt, unsigned HOST_WIDE_INT n,
+ const char *singular_gmsgid,
+ const char *plural_gmsgid, va_list *ap)
+ ATTRIBUTE_GCC_DIAG (6, 0) ATTRIBUTE_GCC_DIAG (7, 0);
extern bool format_warning_at_substring (const substring_loc &fmt_loc,
location_t param_loc,
const char *corrected_substring,
int opt, const char *gmsgid, ...)
- ATTRIBUTE_GCC_DIAG (5,0);
+ ATTRIBUTE_GCC_DIAG (5, 6);
+
+extern bool format_warning_at_substring_n (const substring_loc &fmt_loc,
+ location_t param_loc,
+ const char *corrected_substring,
+ int opt, unsigned HOST_WIDE_INT n,
+ const char *singular_gmsgid,
+ const char *plural_gmsgid, ...)
+ ATTRIBUTE_GCC_DIAG (6, 8) ATTRIBUTE_GCC_DIAG (7, 8);
/* Implementation detail, for use when implementing
LANG_HOOKS_GET_SUBSTRING_LOCATION. */