-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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: overflow in int -> string #11330
Comments
Given the spec as is, I believe this should compile w/o errors. The spec says: http://tip.golang.org/ref/spec#Conversions
and:
There's no mention of a compile-time (or even run-time) error. The integer should be converted into "\uFFFD". |
Closed by mistake. |
Then this is a bug in gc, right? |
@dvyukov yes, I believe this is a gc compiler bug. Note that we already return "\ufffd" for values < 0: |
Too late for Go 1.5. The only possible visible effect of making changes to fix hypothetical bugs like this one is introducing real ones. |
This was fixed via https://go-review.googlesource.com/#/c/21344/ (fix for #15039). |
Gc rejects to compile the following program:
saying:
go/types compile it successfully.
Compilers must agree on whether it is a valid Go program or not.
on commit af81789
The text was updated successfully, but these errors were encountered: