Closed jefftrull closed 3 months ago
Note: I only see this warning in gcc version 7 and before. The release notes for gcc 8 quietly note that -Wstrict-overflow
is deprecated, although the documentation still lists it today, years later. At any rate the warning seems correct.
Running the unit tests when compiled with -fsanitize=signed-integer-overflow
will cause two failures
I noticed a warning in CI today for two lines in
cpp_expression_value.hpp
:warning: assuming signed overflow does not occur when assuming that (X + c) < X is always false
It looks like we perform the calculation, and then check to see if an overflow resulted. The compiler may discard the check (or worse).