From 740e7cd77881f85076e1c66b8aef6d9599800750 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Fri, 6 Jul 2018 15:18:23 -0400 Subject: [PATCH 36/46] FIXME: remark: drop 'int opt' param --- gcc/diagnostic-core.h | 4 ++-- gcc/diagnostic.c | 4 ++-- gcc/optinfo-emit-diagnostics.cc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/gcc/diagnostic-core.h b/gcc/diagnostic-core.h index 63166b8..e241564 100644 --- a/gcc/diagnostic-core.h +++ b/gcc/diagnostic-core.h @@ -69,8 +69,8 @@ extern bool warning_at (location_t, int, const char *, ...) ATTRIBUTE_GCC_DIAG(3,4); extern bool warning_at (rich_location *, int, const char *, ...) ATTRIBUTE_GCC_DIAG(3,4); -extern bool remark (location_t, int, const char *, ...) - ATTRIBUTE_GCC_DIAG(3,4); +extern bool remark (location_t, const char *, ...) + ATTRIBUTE_GCC_DIAG(2,3); extern void error (const char *, ...) ATTRIBUTE_GCC_DIAG(1,2); extern void error_n (location_t, unsigned HOST_WIDE_INT, const char *, const char *, ...) diff --git a/gcc/diagnostic.c b/gcc/diagnostic.c index 97ed88b..562d18e 100644 --- a/gcc/diagnostic.c +++ b/gcc/diagnostic.c @@ -1281,12 +1281,12 @@ warning_n (location_t location, int opt, unsigned HOST_WIDE_INT n, // FIXME: we don't yet have a more fine-grained way of inhibiting remarks bool -remark (location_t location, int opt, const char *gmsgid, ...) +remark (location_t location, const char *gmsgid, ...) { va_list ap; va_start (ap, gmsgid); rich_location richloc (line_table, location); - bool ret = diagnostic_impl (&richloc, opt, gmsgid, &ap, DK_REMARK); + bool ret = diagnostic_impl (&richloc, -1, gmsgid, &ap, DK_REMARK); va_end (ap); return ret; } diff --git a/gcc/optinfo-emit-diagnostics.cc b/gcc/optinfo-emit-diagnostics.cc index 5320379..285cb3f 100644 --- a/gcc/optinfo-emit-diagnostics.cc +++ b/gcc/optinfo-emit-diagnostics.cc @@ -213,7 +213,7 @@ emit_optinfo_as_diagnostic_remark (const optinfo *optinfo) const char *msg = pp_formatted_text (&pp); location_t loc = optinfo->get_location_t (); - remark (loc, 0, "%s", msg); + remark (loc, "%s", msg); } #if CHECKING_P -- 1.8.5.3