Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Properly handle arithmetic exceptions in constant folding #28

Open
edfelten opened this issue May 28, 2020 · 0 comments
Open

Properly handle arithmetic exceptions in constant folding #28

edfelten opened this issue May 28, 2020 · 0 comments
Labels
bug Something isn't working

Comments

@edfelten
Copy link
Contributor

The compiler should detect all arithmetic exceptions (overflow, underflow, divide by zero, etc) when doing constant folding, and report errors.

Note that this will report errors in some cases where the same operation done at runtime would complete. For example, addition ops don't check for overflow at runtime; they just compute the result mod 2**256. But we think we should report such an overflow as a compile-time error, because the programmer probably doesn't want it to happen.

Later we will return to the issue of how to handle the possibility of runtime arithmetic exceptions.

@edfelten edfelten added the bug Something isn't working label May 28, 2020
@RGates94 RGates94 mentioned this issue May 28, 2020
rachel-bousfield added a commit that referenced this issue May 27, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant