-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Fixed length array type with high un-suffixed count literal incorrectly treated as negative count #15919
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
Comments
Can be easily fixed after #15709 landed |
fn main() {
let x = [0usize; 9223372036854775808];
//~^ error: the type `[usize; 9223372036854775808]` is too big for the current architecture
} Seems that it is not an issue any more. |
I'm thinking that if it behave differently on different platforms, is it making it an undefined behavior? |
@bombless This does not make it undefined behavior. It's very much defined behavior. If it were undefined behavior, then any |
…eykril SCIP: populate new SymbolInformation fields Fixes rust-lang#15919
A fixed-length array expression with a repeat count with the high bit set and no suffix is incorrectly treated as a negative count.
On a 64-bit machine:
This results in
The text was updated successfully, but these errors were encountered: