[PATCH][RFC] Do not stream all zeros for gcda files.

Martin Liška mliska@suse.cz
Fri Jul 3 11:44:02 GMT 2020


On 7/3/20 10:46 AM, Rainer Orth wrote:
> 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:

Hello.

Thank you for the fix.

Please use '(gcov_position_t)' instread '(unsigned)'.
It's fine with the patch and please reference:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96046

Martin

> 
> 
> 
> 	Rainer
> 



More information about the Gcc-patches mailing list