-
Notifications
You must be signed in to change notification settings - Fork 155
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
CalcIntType -> long, because int might lead to loss of data… #63
Open
ams-tschoening
wants to merge
10
commits into
kaitai-io:master
Choose a base branch
from
ams-ts-kaitai:calcinttype_int_to_long
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
CalcIntType -> long, because int might lead to loss of data… #63
ams-tschoening
wants to merge
10
commits into
kaitai-io:master
from
ams-ts-kaitai:calcinttype_int_to_long
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ams-tschoening
changed the title
CalcIntType -> long, because int might lead to loss of data in some c…
CalcIntType -> long, because int might lead to loss of data…
Jan 27, 2017
… lietral is provided. which should be a regular use case. Long.valueOf(...) shoudl have been optimized in that case for low indices as well, but this way we don't need to care and don't add extra source to the result.
…ts is created: new ArrayList<Long>(Arrays.asList(0, 1, 100500)) doIntLiteral doesn't know that a Long is required and the va.lues itself don't require one,. so doIntLiteral keeps providing the numeric literals without "L" suffix, which results in "int"s by default in Java and an array of int can't be casted to a required array of long.
…Request?prid=494963
…ch lead to compiler errors.
ams-tschoening
force-pushed
the
calcinttype_int_to_long
branch
from
April 8, 2019 16:28
ddf9ced
to
e0f79f3
Compare
Actually, I wanted to return to this topic. I'll try to check if we can make that transition with the tests and hopefully we'll do it. Current "default is 32-bit int" indeed makes things much more complicated than it could be. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
…in some calculations.
https://github.com/kaitai-io/kaitai_struct_compiler/issues/62