https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83463

--- Comment #11 from Martin Sebor <msebor at gcc dot gnu.org> ---
(In reply to Jakub Jelinek from comment #9)
> Another bug:
>
> %lli isn't portable and casts to long long aren't needed.  You should remove
> those, and use " HOST_WIDE_INT_PRINT_DEC " instead of %lli in the format
> strings.

I'll address this nit along with the other uses of %lli in the compiler in a
separate change:

$ find . -name "*.c" ! -path "*/testsuite/*" | xargs grep -l %lli)
./pretty-print.c
./gimple-ssa-warn-restrict.c
./gimple-ssa-sprintf.c
./ipa-devirt.c

> What happens if offrange[0] is > HOST_WIDE_INT_MAX or either offrange[0] or
> offrange[1] < HOST_WIDE_INT_MIN ?  Is that something guaranteed not to
> happen by the callers?

I think what happens is truncation/wraparound.  GCC should have a directive for
formatting offset_int to avoid these issues.

Reply via email to