[poppler] goo/GooCheckedOps.h
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Dec 1 10:40:53 UTC 2021
goo/GooCheckedOps.h | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit a527e6bff642a0276467d8e0245b0ddaf60635bc
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Dec 1 11:35:00 2021 +0100
Add note of when we can remove the __GNUC__ checks
diff --git a/goo/GooCheckedOps.h b/goo/GooCheckedOps.h
index a87a3e68..0cb74337 100644
--- a/goo/GooCheckedOps.h
+++ b/goo/GooCheckedOps.h
@@ -37,6 +37,8 @@ inline bool checkedAssign(long long lz, T *z)
template<typename T>
inline bool checkedAdd(T x, T y, T *z)
{
+// The __GNUC__ checks can not be removed until we depend on GCC >= 10.1
+// which is the first version that returns true for __has_builtin(__builtin_add_overflow)
#if __GNUC__ >= 5 || __has_builtin(__builtin_add_overflow)
return __builtin_add_overflow(x, y, z);
#else
More information about the poppler
mailing list