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

Handle INT64_MIN value #371

Merged
merged 2 commits into from
Apr 30, 2019
Merged

Handle INT64_MIN value #371

merged 2 commits into from
Apr 30, 2019

Conversation

jacobperron
Copy link
Member

@jacobperron jacobperron commented Apr 30, 2019

Before the unary minus, the compiler first evaluates the literal, which is larger than the maximum allowed integer and results in a warning.
To correctly get the value for INT64_MIN, we substract from one number larger.
See https://en.cppreference.com/w/cpp/language/integer_literal.

Also adding missing integer suffixes for generated C code.

Before the unary minus, the compiler first evaluates the literal, which is larger than the maximum allowed integer
and results in a warning.
To correctly get the value for INT64_MIN, we substract from one number larger.
See https://en.cppreference.com/w/cpp/language/integer_literal.

Also adding missing integer suffixes for generated C code.

Signed-off-by: Jacob Perron <[email protected]>
@jacobperron jacobperron added in progress Actively being worked on (Kanban column) in review Waiting for review (Kanban column) and removed in progress Actively being worked on (Kanban column) labels Apr 30, 2019
@jacobperron
Copy link
Member Author

jacobperron commented Apr 30, 2019

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Edit: Re-triggered after addressing review

Signed-off-by: Jacob Perron <[email protected]>
@jacobperron jacobperron merged commit bc1133e into master Apr 30, 2019
@delete-merged-branch delete-merged-branch bot deleted the jacob/fix_min_int64 branch April 30, 2019 16:43
@jacobperron jacobperron removed the in review Waiting for review (Kanban column) label Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants