On Thu, 27 Feb 2020, Gerald Pfeifer wrote: >> This (or rather its predecessor?) breaks bootstrap on 32-bit >> i386-unknown-freebsd11.3. >> >> /scratch/tmp/gerald/gcc10-devel-work/gcc-10-20200223/gcc/value-prof.c: In >> function 'void dump_histogram_value(FILE*, histogram_value)': >> /scratch/tmp/gerald/gcc10-devel-work/gcc-10-20200223/gcc/value-prof.c:268:28: >> error: format '%lld' expects argument of type 'long long int', but argument >> 3 hastype 'int' [-Werror=format=] >> 268 | fprintf (dump_file, " all: %" PRId64 "%s, values: ", >> | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> 269 | abs ((int64_t) hist->hvalue.counters[0]), >> | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >> | | >> | int >> >> (I'm not sure why my nightly tester has not caught this, but only >> the snapshot did.) > This is now https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93962 .
And Andrew had a very good hint there (thanks!). The patch below indeed restores the build on i386-unknown-freebsd11. Okay? Or does this qualify as obvious? Gerald 2020-02-28 Gerald Pfeifer <ger...@pfeifer.com> Andrew Pinski <apin...@marvell.com> PR bootstrap/93962 * value-prof.c (dump_histogram_value): Use std::abs instead of abs. diff --git a/gcc/value-prof.c b/gcc/value-prof.c index 8e9f129708a..585b909096f 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++)