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: erroneously accepts indented directive comments #18393

Closed
mdempsky opened this issue Dec 20, 2016 · 1 comment
Closed

cmd/compile: erroneously accepts indented directive comments #18393

mdempsky opened this issue Dec 20, 2016 · 1 comment
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@mdempsky
Copy link
Member

According to cmd/compile's documentation:

The compiler accepts compiler directives in the form of // comments at the beginning of a line.

go/scanner conforms to this, and has unit tests that indented directives are rejected.

However, cmd/compile accepts them: https://play.golang.org/p/FmZkjPtRHc (Example by @griesemer from https://go-review.googlesource.com/#/c/34273/21/src/cmd/internal/src/pos.go@112)

This issue was present in 1.7, so it can wait until 1.9.

@mdempsky mdempsky added this to the Go1.9 milestone Dec 20, 2016
@mdempsky mdempsky added the NeedsFix The path to resolution is known, but the work has not been done. label Dec 20, 2016
@griesemer griesemer self-assigned this Dec 20, 2016
@gopherbot
Copy link

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

@golang golang locked and limited conversation to collaborators Feb 15, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

3 participants