Re: [PATCH] preprocessor: Fix ICE with too long line in fmtwarn [PR96935]

2020-09-16 Thread Marek Polacek via Gcc-patches
On Wed, Sep 16, 2020 at 03:15:19PM -0400, David Malcolm via Gcc-patches wrote: > On Wed, 2020-09-16 at 11:16 -0400, Marek Polacek wrote: > > Here we ICE in char_span::subspan because the offset it gets is -1. > > It's -1 because get_substring_ranges_for_loc gets a location whose > > column was 0.

Re: [PATCH] preprocessor: Fix ICE with too long line in fmtwarn [PR96935]

2020-09-16 Thread David Malcolm via Gcc-patches
On Wed, 2020-09-16 at 11:16 -0400, Marek Polacek wrote: > Here we ICE in char_span::subspan because the offset it gets is -1. > It's -1 because get_substring_ranges_for_loc gets a location whose > column was 0. That only happens in testcases like the attached where > we're dealing with extremely l

[PATCH] preprocessor: Fix ICE with too long line in fmtwarn [PR96935]

2020-09-16 Thread Marek Polacek via Gcc-patches
Here we ICE in char_span::subspan because the offset it gets is -1. It's -1 because get_substring_ranges_for_loc gets a location whose column was 0. That only happens in testcases like the attached where we're dealing with extremely long lines (at least 4065 chars it seems). This does happen in pr