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: endless compile for invalid declaration #13471

Closed
griesemer opened this issue Dec 3, 2015 · 3 comments
Closed

cmd/compile: endless compile for invalid declaration #13471

griesemer opened this issue Dec 3, 2015 · 3 comments
Milestone

Comments

@griesemer
Copy link
Contributor

package p
const c = 1e646456992

works (now), but:

package p
const c int = 1e646456992

ends up taking forever.

The time is spent trying to convert the large constant into an integer for the error message (constant ... overflows int).

As an aside, we should also make sure that (internally) the constant is not converted into an integer in the first place.

@griesemer griesemer self-assigned this Dec 3, 2015
@griesemer griesemer added this to the Go1.6 milestone Dec 3, 2015
@mdempsky
Copy link
Member

mdempsky commented Dec 3, 2015

(Your two code snippets look identical?)

@griesemer
Copy link
Contributor Author

@mdempsky fixed - thanks for pointing it out.

@gopherbot
Copy link

CL https://golang.org/cl/17401 mentions this issue.

@golang golang locked and limited conversation to collaborators Dec 14, 2016
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

3 participants