Hi Gerald, > On Thu, 2 Jul 2020, Martin Liška wrote: >> All right, you convinced me and I'm going to install the patch. > > I'm fraid this may have broke i386-unknown-freebsd-11.4 (with clang 10.0 > as bootstrap compiler, though that doesn't appear to be the trigger here): > > /scratch/tmp/gerald/OBJ-0702-1130/./prev-gcc/xg++ ... > -g -O2 -fno-checking -gtoggle -DIN_GCC -fno-exceptions -fno-rtti > -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings > -Wcast-qual -Wno-error=format-diag -Wmissing-format-attribute > -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros > -Wno-overlength-strings -Werror -fno-common ... > -o gcov-dump.o -MT gcov-dump.o -MMD -MP -MF ./.deps/gcov-dump.TPo > /scratch/tmp/gerald/GCC-HEAD/gcc/gcov-dump.c > /scratch/tmp/gerald/GCC-HEAD/gcc/gcov-dump.c: In function 'void > tag_function(const char*, unsigned int, int, unsigned int)': > /scratch/tmp/gerald/GCC-HEAD/gcc/gcov-dump.c:312:34: error: comparison of > integer expressions of different signedness: 'long unsigned int' and 'int' > [-Werror=sign-compare] > 312 | if (gcov_position () - pos < length) > | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
I'm seeing the same on both i386-pc-solaris2.11 and sparc-sun-solaris2.11. It's in stage2, so the bootstrap compiler (gcc 8 in my case) should be immaterial. The following patch allowed bootstrap to succeed:
--- gcc/gcov-dump.c 2020-07-03 09:09:35.027662036 +0000 +++ gcc/gcov-dump.c.orig 2020-07-02 20:03:21.955097136 +0000 @@ -299,7 +299,7 @@ tag_function (const char *filename ATTRI unsigned tag ATTRIBUTE_UNUSED, int length, unsigned depth ATTRIBUTE_UNUSED) { - long pos = gcov_position (); + gcov_position_t pos = gcov_position (); if (!length) printf (" placeholder"); @@ -309,7 +309,7 @@ tag_function (const char *filename ATTRI printf (", lineno_checksum=0x%08x", gcov_read_unsigned ()); printf (", cfg_checksum=0x%08x", gcov_read_unsigned ()); - if (gcov_position () - pos < length) + if (gcov_position () - pos < (unsigned) length) { const char *name;
Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University