diff options
author | Jens Wiklander <jens.wiklander@linaro.org> | 2018-05-08 09:05:36 +0200 |
---|---|---|
committer | Jerome Forissier <jerome.forissier@linaro.org> | 2018-05-09 09:20:57 +0200 |
commit | 86ab9ffe82c6412fc6d930446c2e5cdda6531be7 (patch) | |
tree | 9557018c20bcec2f5bdd63792370a58d0c151977 /lib/libutils/isoc | |
parent | 2b30433772aff8e4b77e575aee32cf5c8e24c7d2 (diff) |
util: fix fallback SUB_OVERFLOW() macro
This only applies when the compiler doesn't provide the
__builtin_sub_overflow() function (before GCC 5.1).
Fixes problem due to integer promotion in overflow macros when result is
a signed type and the subtrahend is an unsigned type with a low value.
SUB_OVERFLOW() still doesn't handle all combinations of signed and
unsigned types in the parameters.
Fixes: ce0d8e2da340 ("util: add macros for arithmetics with overflow checking")
Acked-by: Jerome Forissier <jerome.forissier@linaro.org>
Signed-off-by: Jens Wiklander <jens.wiklander@linaro.org>
Diffstat (limited to 'lib/libutils/isoc')
0 files changed, 0 insertions, 0 deletions