[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[task #16114] Print warning where integer overflow happens
From: |
Siyang He |
Subject: |
[task #16114] Print warning where integer overflow happens |
Date: |
Wed, 29 Mar 2023 16:21:19 -0400 (EDT) |
Follow-up Comment #10, task #16114 (project gnuastro):
Excellent Mohammad!
distcheck passed and you can find my changes at
https://codeberg.org/decaf/gnuastro/src/branch/overflow-check
Overview of changes:
- lib/gnuastro/arithmetic.h: I define the flag
GAL_ARITHMETIC_FLAG_OVERFLOW_CHECK.
- lib: I add "overflow_check" versions of the plus, minus, multiply, and
divide operations.
- lib/arithmetic.c: I call the appropriate version (check for overflow vs.
don't check) of each arithmetic function from arithmetic_binary().
- lib/gnuastro-internal/arithmetic-binary.h: I define a few more levels of
macros for overflow checks.
I would appreciate your feedback. Thank you!
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/task/?16114>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/