-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
Exception on overflow in unsigned->signed conversion #1153
Comments
pirapira
changed the title
Exception on unsigned->signed conversion
Exception on overflow in unsigned->signed conversion
Oct 5, 2016
Are you talking about explicit conversions? I think we should not throw an exception for explicit conversions because otherwise there is no way to actually perform explicit overflow. There have been suggestions to provide two types of explicit conversions with different error behaviour, but there is no proposal on syntax yet. |
I'm trying to enumerate overflows in arithmetics. |
Delegated back to #796. |
axic
pushed a commit
that referenced
this issue
Nov 20, 2018
* Create eip-transient_storage.md * Update eip-transient_storage.md * Update eip-transient_storage.md * Update eip-transient_storage.md * Update eip-transient_storage.md * Update eip-transient_storage.md * Update eip-transient_storage.md * Update and rename eip-transient_storage.md to eip-1153.md * Add missing colon
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When an unsigned integer is converted to a signed integer of the same size, in half the cases, the original number is not expressible in the target type. This is one form of overflow and it should cause an exception, following the discussion in #796.
The text was updated successfully, but these errors were encountered: