Re: [PATCH 3/4] Use class substring_loc in c-format.c (PR c/52952)

2016-08-08 Thread David Malcolm
On Thu, 2016-08-04 at 12:08 -0600, Jeff Law wrote: > On 08/03/2016 09:45 AM, David Malcolm wrote: > > This patch updates c-format.c to use the new class substring_loc, > > added > > in the previous patch, replacing location_column_from_byte_offset. > > Hence with this patch, Wformat can underline t

Re: [PATCH 3/4] Use class substring_loc in c-format.c (PR c/52952)

2016-08-04 Thread Jeff Law
On 08/04/2016 01:24 PM, David Malcolm wrote: Do you realize that this isn't used for ~700 lines after this point? Is there any sensible way to factor some code here to avoid the coding disconnect. I realize the function was huge before you got in here, but if at all possible, I'd like to see a

Re: [PATCH 3/4] Use class substring_loc in c-format.c (PR c/52952)

2016-08-04 Thread David Malcolm
On Thu, 2016-08-04 at 12:08 -0600, Jeff Law wrote: > On 08/03/2016 09:45 AM, David Malcolm wrote: > > This patch updates c-format.c to use the new class substring_loc, > > added > > in the previous patch, replacing location_column_from_byte_offset. > > Hence with this patch, Wformat can underline t

Re: [PATCH 3/4] Use class substring_loc in c-format.c (PR c/52952)

2016-08-04 Thread Jeff Law
On 08/03/2016 09:45 AM, David Malcolm wrote: This patch updates c-format.c to use the new class substring_loc, added in the previous patch, replacing location_column_from_byte_offset. Hence with this patch, Wformat can underline the precise erroneous format string in many more cases. The patch a

[PATCH 3/4] Use class substring_loc in c-format.c (PR c/52952)

2016-08-03 Thread David Malcolm
This patch updates c-format.c to use the new class substring_loc, added in the previous patch, replacing location_column_from_byte_offset. Hence with this patch, Wformat can underline the precise erroneous format string in many more cases. The patch also introduces two new functions for emitting W