git: 9c31c1a82358 - releng/15.0 - include/stdckdint.h: make the header compatible with C++
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 25 Oct 2025 23:06:51 UTC
The branch releng/15.0 has been updated by cperciva:
URL: https://cgit.FreeBSD.org/src/commit/?id=9c31c1a823580a2816f9e856b4f14307ff3b22b7
commit 9c31c1a823580a2816f9e856b4f14307ff3b22b7
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-10-17 03:49:14 +0000
Commit: Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2025-10-25 22:10:19 +0000
include/stdckdint.h: make the header compatible with C++
Approved by: re (cperciva)
PR: 290299
(cherry picked from commit 3c052bec12fcf09f81ba0760ebecec38e196d332)
(cherry picked from commit e54e24bcc7810ba96483504bbd8f32dac8f24895)
---
include/stdckdint.h | 6 +++---
1 file 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")