Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: line number lost for error message #18459

Closed
griesemer opened this issue Dec 29, 2016 · 4 comments
Closed

cmd/compile: line number lost for error message #18459

griesemer opened this issue Dec 29, 2016 · 4 comments
Milestone

Comments

@griesemer
Copy link
Contributor

https://play.golang.org/p/Qc-jCD5inV produces

main.go:3: //go:nowritebarrier only allowed in runtime

but the latest repo ( go version devel +bf45099 Tue Dec 27 16:53:33 2016 -0800 darwin/amd64 ) has lost the information:

<unknown line number>: //go:nowritebarrier only allowed in runtime

This is a regression from 1.7.

@griesemer griesemer added this to the Go1.8 milestone Dec 29, 2016
@odeke-em
Copy link
Member

@griesemer I encountered this and fixed it in my CL https://go-review.googlesource.com/c/34562 by changing the signature of pragmaValue to return an error as well and then finally doing

p.error(syntax.Error{Pos: pos, Line: line, Msg: err.Error()})

@griesemer
Copy link
Contributor Author

@odeke-em Thanks for this. I have a fix that's much smaller that we might consider for 1.8. Your fix may be cleaner, but at this point we want to have minimal changes, if any.

@griesemer griesemer self-assigned this Dec 29, 2016
@odeke-em
Copy link
Member

Awesome, sounds like a plan.

@gopherbot
Copy link

CL https://golang.org/cl/34721 mentions this issue.

@golang golang locked and limited conversation to collaborators Jan 9, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants