https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89410

--- Comment #8 from Segher Boessenkool <segher at gcc dot gnu.org> ---
The C standard does not allow the line number (in a #line directive) to be
smaller than 1 or bigger than 0x7fffffff.  It says nothing about actually
having this many lines, or overflowing the line number with following lines,
but I suppose we could disallow that as well.

As the ICEs show many parts of GCC assume line numbers increase, so the
wrap-around signed integer is a problem (it is anyway, it's UB in the compiler
itself).  We could make the line number saturate, but this particular ICE won't
go away unless line numbers are strictly increasing (or the code is changed).
Changing the type to 64 bit won't help at all either, of course (we never
actually see source files of 2G lines, already).

Reply via email to