[Bug c/89410] [7/8/9 Regression] ICE in calculate_line_spans, at diagnostic-show-locus.c:1237 after #line
jg at jguk dot org
gcc-bugzilla@gcc.gnu.org
Wed Feb 20 19:16:00 GMT 2019
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89410
--- Comment #12 from Jonny Grant <jg at jguk dot org> ---
Just to add
C spec says UB.
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1256.pdf
"The #line preprocessing directive that results after expansion does not match
one of
the two well-defined forms, or its digit sequence specifies zero or a number
greater
than 2147483647 (6.10.4)."
As I understand it, it is #line <the next line will be numbered>
So if it is #line 1, the following line (actual line 2) will be counted as line
1.
#line 0, means that the actual 2nd line in a file is treated as 0.
More information about the Gcc-bugs
mailing list