On Wed, May 28, 2014 at 3:15 PM, FX <fxcoud...@gmail.com> wrote:
>> After lengthy IRC discussions, what Richard and I can live with is
>> && !defined(__clang__) in this particular case that uses longlong.h
>> in GCC sources, with a comment why.
>
> I’ll test this patch and commit if there is no problem. But right now, 
> current trunk doesn’t build on x86_64-apple-darwin due to error below. 
> Richard, could this be due to your revision 211013?

Hum, yeah.  But why does it even warn if sizeof (long) == sizeof (long long)?
I suppose casting the result of CWI_ELT () to uint64_t fixes this.  Do
similar errors happen elsewhere?

(the hex printfs expect unsigned types but CWI_ELT returns a signed
HWI)

Richard.

> FX
>
>
>
> ../../trunk/gcc/rtl.c: In function ‘void cwi_output_hex(FILE*, const_rtx)’:
> ../../trunk/gcc/rtl.c:239:62: error: format ‘%llx’ expects argument of type 
> ‘long long unsigned int’, but argument 3 has type ‘long int’ [-Werror=format=]
>    fprintf (outfile, HOST_WIDE_INT_PRINT_HEX, CWI_ELT (x, --i));
>                                                               ^
> ../../trunk/gcc/rtl.c:239:62: error: format ‘%llx’ expects argument of type 
> ‘long long unsigned int’, but argument 3 has type ‘long int’ [-Werror=format=]
> ../../trunk/gcc/rtl.c:241:69: error: format ‘%llx’ expects argument of type 
> ‘long long unsigned int’, but argument 3 has type ‘long int’ [-Werror=format=]
>      fprintf (outfile, HOST_WIDE_INT_PRINT_PADDED_HEX, CWI_ELT (x, i));
>                                                                      ^
> ../../trunk/gcc/rtl.c:241:69: error: format ‘%llx’ expects argument of type 
> ‘long long unsigned int’, but argument 3 has type ‘long int’ [-Werror=format=]
> cc1plus: all warnings being treated as errors
> make[3]: *** [build/rtl.o] Error 1
> make[2]: *** [all-stage2-gcc] Error 2
> make[1]: *** [stage2-bubble] Error 2
> make: *** [all] Error 2
>
>
>

Reply via email to