Skip to content

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

Closed

Description

@griesemer

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.

Activity

  1. added this to the Go1.8 milestone on Dec 29, 2016
  2. odeke-em commented on Dec 29, 2016

    @odeke-em
    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()})
  3. griesemer commented on Dec 29, 2016

    @griesemer
    ContributorAuthor

    @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.

  4. self-assigned this
    on Dec 29, 2016
  5. odeke-em commented on Dec 29, 2016

    @odeke-em
    Member

    Awesome, sounds like a plan.

  6. gopherbot commented on Dec 29, 2016

    @gopherbot
    Contributor

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

  7. locked and limited conversation to collaborators on Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions