From 20a235a8b443a81ea0ec6a10f260b119f2193a69 Mon Sep 17 00:00:00 2001 From: Jeff Law Date: Wed, 4 Mar 2020 16:25:11 -0700 Subject: [PATCH] Fix format warning which showed up on FreeBSD 11.3. PR bootstrap/93962 * value-prof.c (dump_histogram_value): Use std::abs. --- gcc/ChangeLog | 5 +++++ gcc/value-prof.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0df606a..5b2e4a8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2020-03-04 Andrew Pinski + + PR bootstrap/93962 + * value-prof.c (dump_histogram_value): Use std::abs. + 2020-03-04 Martin Sebor PR tree-optimization/93986 diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 8e9f129..585b909 100644 --- a/gcc/value-prof.c +++ b/gcc/value-prof.c @@ -266,7 +266,7 @@ dump_histogram_value (FILE *dump_file, histogram_value hist) if (hist->hvalue.counters) { fprintf (dump_file, " all: %" PRId64 "%s, values: ", - abs ((int64_t) hist->hvalue.counters[0]), + std::abs ((int64_t) hist->hvalue.counters[0]), hist->hvalue.counters[0] < 0 ? " (values missing)": ""); for (unsigned i = 0; i < GCOV_TOPN_VALUES; i++) -- 2.7.4