Re: [PATCH] avoid using %lli et al.

2018-01-05 Thread Martin Sebor
On 01/04/2018 08:53 AM, Jakub Jelinek wrote: On Thu, Jan 04, 2018 at 08:50:30AM -0700, Martin Sebor wrote: On 01/04/2018 01:30 AM, Jakub Jelinek wrote: On Wed, Jan 03, 2018 at 05:00:41PM -0700, Martin Sebor wrote: This is an example where having a solution for bug 78014 would be helpful. I.e.

Re: [PATCH] avoid using %lli et al.

2018-01-04 Thread Jakub Jelinek
On Thu, Jan 04, 2018 at 08:50:30AM -0700, Martin Sebor wrote: > On 01/04/2018 01:30 AM, Jakub Jelinek wrote: > > On Wed, Jan 03, 2018 at 05:00:41PM -0700, Martin Sebor wrote: > > > This is an example where having a solution for bug 78014 would > > > be helpful. I.e., a -Wformat checker to help enf

Re: [PATCH] avoid using %lli et al.

2018-01-04 Thread Martin Sebor
On 01/04/2018 01:30 AM, Jakub Jelinek wrote: On Wed, Jan 03, 2018 at 05:00:41PM -0700, Martin Sebor wrote: This is an example where having a solution for bug 78014 would be helpful. I.e., a -Wformat checker to help enforce the use No, because %zu isn't portable enough for all the hosts we sup

Re: [PATCH] avoid using %lli et al.

2018-01-04 Thread Jakub Jelinek
On Wed, Jan 03, 2018 at 05:00:41PM -0700, Martin Sebor wrote: > This is an example where having a solution for bug 78014 would > be helpful. I.e., a -Wformat checker to help enforce the use No, because %zu isn't portable enough for all the hosts we support. What we could do is define SIZE_T_PRIN

Re: [PATCH] avoid using %lli et al.

2018-01-03 Thread Martin Sebor
On 01/03/2018 04:47 PM, Jakub Jelinek wrote: On Tue, Jan 02, 2018 at 04:40:50PM -0700, Jeff Law wrote: Attached is the patch with the casts removed (still bootstrapping). Martin gcc-printf-lli.diff gcc/ChangeLog: * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use

Re: [PATCH] avoid using %lli et al.

2018-01-03 Thread Jakub Jelinek
On Tue, Jan 02, 2018 at 04:40:50PM -0700, Jeff Law wrote: > > Attached is the patch with the casts removed (still bootstrapping). > > > > Martin > > > > gcc-printf-lli.diff > > > > > > gcc/ChangeLog: > > > > * gimple-ssa-warn-restrict.c (builtin_memref::builtin_memref): Use > > offset_

Re: [PATCH] avoid using %lli et al.

2018-01-02 Thread Jeff Law
On 12/20/2017 05:28 PM, Martin Sebor wrote: > On 12/20/2017 05:07 PM, Richard Sandiford wrote: >> Martin Sebor  writes: >>> The attached patch replaces use of %lli and %llu with >>> HOST_WIDE_INT_PRINT_DEC and HOST_WIDE_INT_PRINT_UNSIGNED >>> for portability, and also replaces wide_int::to_shwi() w

Re: [PATCH] avoid using %lli et al.

2017-12-31 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2017-12/msg01399.html On 12/20/2017 05:28 PM, Martin Sebor wrote: On 12/20/2017 05:07 PM, Richard Sandiford wrote: Martin Sebor writes: The attached patch replaces use of %lli and %llu with HOST_WIDE_INT_PRINT_DEC and HOST_WIDE_INT_PRINT_UNSIGNED fo

Re: [PATCH] avoid using %lli et al.

2017-12-20 Thread Martin Sebor
On 12/20/2017 05:07 PM, Richard Sandiford wrote: Martin Sebor writes: The attached patch replaces use of %lli and %llu with HOST_WIDE_INT_PRINT_DEC and HOST_WIDE_INT_PRINT_UNSIGNED for portability, and also replaces wide_int::to_shwi() with offset_int::from(). Thanks for doing this. I think

Re: [PATCH] avoid using %lli et al.

2017-12-20 Thread Jakub Jelinek
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.

Re: [PATCH] avoid using %lli et al.

2017-12-20 Thread Richard Sandiford
Martin Sebor writes: > The attached patch replaces use of %lli and %llu with > HOST_WIDE_INT_PRINT_DEC and HOST_WIDE_INT_PRINT_UNSIGNED > for portability, and also replaces wide_int::to_shwi() with > offset_int::from(). Thanks for doing this. I think you need to remove the (long long) casts too