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

Incorrect check of maximum literal value #313

Closed
treiher opened this issue Jul 1, 2020 · 0 comments · Fixed by #318
Closed

Incorrect check of maximum literal value #313

treiher opened this issue Jul 1, 2020 · 0 comments · Fixed by #318
Assignees
Labels
bug model Related to model package (e.g., model verification)

Comments

@treiher
Copy link
Collaborator

treiher commented Jul 1, 2020

Ada only allows literal values up to 2^63 - 1, even if the size of the enum is 64 bit.

package Test is

    type A is (B => 9223372036854775808) with Size => 64;  --  2**63 = 9223372036854775808

end Test;
rflx-test.ads:20:20: error: value outside permitted range

   compilation of rflx-test.ads failed
 17    type A is (B) with
 18      Size =>
 19        64;
 20    for A use (B => 9223372036854775808);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug model Related to model package (e.g., model verification)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant