Skip to content

gccgo: missing declared and not used error #6415

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 · 7 comments
Closed

gccgo: missing declared and not used error #6415

griesemer opened this issue Sep 17, 2013 · 7 comments

Comments

@griesemer
Copy link
Contributor

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

Expected output should be along the lines of:

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.
@rsc
Copy link
Contributor

rsc commented Nov 27, 2013

Comment 1:

Labels changed: added go1.3maybe.

@ianlancetaylor
Copy link
Contributor

Comment 2:

Gccgo is not part of Go 1.3.

Labels changed: removed go1.3maybe.

@rsc
Copy link
Contributor

rsc commented Dec 4, 2013

Comment 3:

Labels changed: added repo-gccgo.

@paranoiacblack
Copy link
Contributor

What's the status of this issue? It appears cmd/gc also remains silent in this situation. Is this still a problem?

@ianlancetaylor
Copy link
Contributor

The same issue for the gc compiler is #6414.

@griesemer
Copy link
Contributor Author

Yes, I'd consider this a bug in gc and gccgo. go/types reports an error.

@paranoiacblack paranoiacblack self-assigned this Jan 13, 2015
@paranoiacblack
Copy link
Contributor

Fixed in gcc.gnu.org/r219916.

hubot pushed a commit to gcc-mirror/gcc that referenced this issue Jan 20, 2015
Fixes golang/go#6415.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219916 138bc75d-0d04-0410-961f-82ee72b054a4
paranoiacblack pushed a commit to golang/gofrontend that referenced this issue Jan 27, 2015
paranoiacblack pushed a commit to golang/gofrontend that referenced this issue Jun 2, 2015
mwhudson added a commit to mwhudson/juju that referenced this issue Dec 14, 2015
…w gccgo

gccgo (in xenial at least) is stricter than gc when it comes to a certain
class of declared but not used variable, see:

    golang/go#6415
    golang/go#3059
jujubot added a commit to juju/juju that referenced this issue Dec 15, 2015
fix api/metricsadder & apiserver/environment test compilation with ne…

…w gccgo

gccgo (in xenial at least) is stricter than gc when it comes to a certain
class of declared but not used variable, see:

    golang/go#6415
    golang/go#3059
@golang golang locked and limited conversation to collaborators Jun 25, 2016
asiekierka pushed a commit to WonderfulToolchain/gcc-ia16 that referenced this issue May 16, 2022
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

5 participants