-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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
ponies: Compiler doesn't warn on statically knowable bounds errors. #156
Comments
Moving priority-someday to the Unplanned milestone. |
Should we change the title of this bug to categorize it under "cmd/compile: ". What does "Ponies: " mean? |
"Ponies" is how we used to label long-term hopeful feature requests. This seems like a feature we could probably implement in the compiler today using SSA. I think that would go against our "no warnings" policy though. |
Thanks for the explanation @mdempsky. |
Yes, I think we know enough to detect this case at compile time now. But as we don't have compiler warnings, and refusing the compile the code would be wrong, the only thing we could do here is compile this code more efficiently. Since it's just going to panic anyway, and no one will ever write this code with intent to actually use it, there's no point. If there's anywhere this belongs, it is vet. With help from SSA this should be detectable. I wonder how common it is. In any case, that should be a separate issue (feel free to open one, anyone). Closing this one. |
by alexjray.ncsu:
Attachments:
The text was updated successfully, but these errors were encountered: