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: independent variables should be initialized in declaration order #7962

Closed
griesemer opened this issue May 9, 2014 · 4 comments

Comments

@griesemer
Copy link
Contributor

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

got:
gc produces the initialization order: c b a .

want:
The variables b and c are independent of each other, and b is declared before c, so the
order should be: b c a .

gccgo reports the order: b c a .

Based on spec clarification https://golang.org/cl/99020043 (issue #6703).
@griesemer
Copy link
Contributor Author

Comment 1:

Fixing this must consider outcome of issue #8485.

@rsc
Copy link
Contributor

rsc commented Sep 15, 2014

Comment 2:

I'm happy to change cmd/gc but not for 1.4.

Labels changed: added release-go1.5, removed release-go1.4.

Status changed to Accepted.

@griesemer
Copy link
Contributor Author

Comment 3:

issue #8485 was closed with revision 191f9dc7d039 and this current issue remains a bug w/
respect to the latest spec.

@bradfitz bradfitz modified the milestone: Go1.5 Dec 16, 2014
@rsc rsc removed accepted labels Apr 14, 2015
@rsc rsc modified the milestones: Go1.6, Go1.5 May 19, 2015
@rsc rsc changed the title cmd/gc: independent variables should be initialized in declaration order cmd/compile: independent variables should be initialized in declaration order Jun 8, 2015
@rsc rsc modified the milestones: Unplanned, Go1.6 Dec 5, 2015
@odeke-em
Copy link
Member

odeke-em commented Jun 7, 2020

Thank you for the filing @griesemer and @rsc!

Just like duplicate bugs #7320, #22326, it was fixed for Go1.13 by @mdempsky's CL 170062.

I shall thus close it.

@odeke-em odeke-em closed this as completed Jun 7, 2020
@golang golang locked and limited conversation to collaborators Jun 7, 2021
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