-
Notifications
You must be signed in to change notification settings - Fork 17.4k
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
gccgo: compiler does not detect illegal assignment to a private struct member #6832
Labels
Comments
Comment 2 by r@rcrowley.org: This feature of gc was actually introduced in 1.2, as well. We use a struct defined pretty much like Dave's a.MyError above which works just fine in Go 1.1.2 but began failing as Dave shows above with Go 1.2. Was there a change that made such assignments illegal? By the lexical rules for exported/unexported the 1.2 behavior seems right but I've always seen error (and string, map, append, copy, len, cap, new, make, etc.) as special and above that rule. |
> Was there a change that made such assignments illegal? By the lexical rules for exported/unexported the 1.2 behavior seems right but I've always seen error (and string, map, append, copy, len, cap, new, make, etc.) as special and above that rule. Nope, these assignments have always been illegal, but this is enforced at compile time, not runtime so if the compiler didn't stop them, nothing will. |
Fixed in gcc.gnu.org/r219313. |
hubot
pushed a commit
to gcc-mirror/gcc
that referenced
this issue
Jan 7, 2015
literals. Fixes golang/go#6832. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@219313 138bc75d-0d04-0410-961f-82ee72b054a4
paranoiacblack
pushed a commit
to golang/gofrontend
that referenced
this issue
Jan 27, 2015
literals. Fixes golang/go#6832. LGTM=iant R=iant CC=gofrontend-dev https://codereview.appspot.com/191500043 Committer: Ian Lance Taylor <iant@golang.org>
paranoiacblack
pushed a commit
to golang/gofrontend
that referenced
this issue
Jun 2, 2015
literals. Fixes golang/go#6832. LGTM=iant R=iant CC=gofrontend-dev https://golang.org/cl/191500043
asiekierka
pushed a commit
to WonderfulToolchain/gcc-ia16
that referenced
this issue
May 16, 2022
literals. Fixes golang/go#6832. From-SVN: r219313
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
The text was updated successfully, but these errors were encountered: