[Bug c/89410] [7/8 Regression] ICE in calculate_line_spans, at diagnostic-show-locus.c:1237 after #line
jg at jguk dot org
gcc-bugzilla@gcc.gnu.org
Sun Feb 24 16:04:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89410
--- Comment #15 from Jonny Grant <jg at jguk dot org> ---
(In reply to Segher Boessenkool from comment #11)
> (In reply to Jonny Grant from comment #9)
> > Maybe zero could be disallowed too.
>
> Yes, but maybe we need that for historical reasons.
>
> > Not sure what is best here, I'm not knowledgeable of GCC, but maybe setting
> > it to -1 if it goes above, and then never increment again if(-1 == line) ...
>
> The testcase will still ICE then... The assert is
>
> /* The spans must be ordered. */
> gcc_assert (prev->m_first_line < next->m_first_line);
Maybe it needs an update, if #line 0 is not allowed
More information about the Gcc-bugs
mailing list