Skip to content

cmd/gc: missing declared and not used error #6414

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

Closed
griesemer opened this issue Sep 17, 2013 · 2 comments
Closed

cmd/gc: missing declared and not used error #6414

griesemer opened this issue Sep 17, 2013 · 2 comments

Comments

@griesemer
Copy link
Contributor

http://play.golang.org/p/kSqOMI9a_6

Expected output:

prog.go:4: s declared and not used

But the compiler is silent.

This is an implementation restriction, and a compiler may be free to restrict or not.
That said, given the specification of the restriction, this is not consistent with the
usage checks that gc already does.

We may not be able to fix this since it may invalidate code that is now compiling.
@griesemer
Copy link
Contributor Author

Comment 1:

Occurrences in std library:
https://golang.org/cl/13242058
https://golang.org/cl/13683044

@remyoudompheng
Copy link
Contributor

Comment 2:

Status changed to Duplicate.

Merged into issue #3059.

@golang golang locked and limited conversation to collaborators Jun 25, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
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

4 participants