Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
cmd/compile: error line number reported is incorrect if it appears after line 0xFFFFF #36850
What version of Go are you using (
I think it's fine to cap line numbers, but we shouldn't report the wrong line number. We should say that we don't know.
(I don't think it's necessary to force the compiler to use more memory, slowing down compilations for everyone, in order to report better error messages for extremely large files. Such files are normally machine generated and as such either have no errors or many errors.)
Hey, I did a little digging, with the intention of creating a PR if you agree.
I did the following change
and re-compiled the toolchain using
The result is that with my Go 1.13, the issue is there.
Sorry for the rambling, long writeup, but I think this outlines how and why this error occurs.
I like Ian's suggestion on not changing the cap, but printing another message when the reported line is at this cap.
I feel that this could be a small change on either
I'll think of a proper suggestion and return to this thread.