On Wed, Dec 20, 2017 at 05:03:23PM -0700, Martin Sebor wrote:
> @@ -1228,24 +1228,30 @@ maybe_diag_overlap (location_t loc, gcall *call, b
>  
>    if (dstref.offrange[0] == dstref.offrange[1]
>        || dstref.offrange[1] > HOST_WIDE_INT_MAX)
> -    sprintf (offstr[0], "%lli", (long long) dstref.offrange[0].to_shwi ());
> +    sprintf (offstr[0], HOST_WIDE_INT_PRINT_DEC,
> +          (long long) dstref.offrange[0].to_shwi ());

to_shwi () returns a HOST_WIDE_INT, there is no point in casting that to
(long long), and in case long long is different from HOST_WIDE_INT it might
result in warnings or even UB.  Just drop those casts everywhere where
the operand already is SHWI or UHWI.

        Jakub

Reply via email to