diff options
| author | Konstantin Belousov <kib@FreeBSD.org> | 2025-10-17 03:49:14 +0000 |
|---|---|---|
| committer | Konstantin Belousov <kib@FreeBSD.org> | 2025-10-24 07:47:12 +0000 |
| commit | e54e24bcc7810ba96483504bbd8f32dac8f24895 (patch) | |
| tree | 4ebc423b3d0cdf64275815167cf7e6b29c22f2cd /include | |
| parent | 0fe083b6e8e8666674a77cf622c1d8edfe7f1ef1 (diff) | |
include/stdckdint.h: make the header compatible with C++
PR: 290299
(cherry picked from commit 3c052bec12fcf09f81ba0760ebecec38e196d332)
Diffstat (limited to 'include')
| -rw-r--r-- | include/stdckdint.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/stdckdint.h b/include/stdckdint.h index af3074dded89..9cb877fe8198 100644 --- a/include/stdckdint.h +++ b/include/stdckdint.h @@ -13,7 +13,7 @@ #if __GNUC_PREREQ__(5, 1) || __has_builtin(__builtin_add_overflow) #define ckd_add(result, a, b) \ - (_Bool)__builtin_add_overflow((a), (b), (result)) + __builtin_add_overflow((a), (b), (result)) #else #define ckd_add(result, a, b) \ _Static_assert(0, "checked addition not supported") @@ -21,7 +21,7 @@ #if __GNUC_PREREQ__(5, 1) || __has_builtin(__builtin_sub_overflow) #define ckd_sub(result, a, b) \ - (_Bool)__builtin_sub_overflow((a), (b), (result)) + __builtin_sub_overflow((a), (b), (result)) #else #define ckd_sub(result, a, b) \ _Static_assert(0, "checked subtraction not supported") @@ -29,7 +29,7 @@ #if __GNUC_PREREQ__(5, 1) || __has_builtin(__builtin_mul_overflow) #define ckd_mul(result, a, b) \ - (_Bool)__builtin_mul_overflow((a), (b), (result)) + __builtin_mul_overflow((a), (b), (result)) #else #define ckd_mul(result, a, b) \ _Static_assert(0, "checked multiplication not supported") |
