fortify-headers

standalone fortify-source implementation
git clone git://git.2f30.org/fortify-headers
Log | Files | Refs | README | LICENSE

commit 254471b1c96c2ab34a043350519aea37a0862b9b
parent d343ba0b0f7554cad5141cd1b7a3a85e0446b950
Author: jvoisin <julien.voisin@dustri.org>
Date:   Mon, 21 Aug 2023 17:11:41 +0200

Remove some todo in __bmo's implementation

Diffstat:
Minclude/fortify-headers.h | 8+++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/fortify-headers.h b/include/fortify-headers.h @@ -101,10 +101,12 @@ #endif /* __has_attribute */ - -/* TODO(jvoisin) Figure a nice way to make use of __builtin_mul_overflow while ignoring the result. */ -/* TODO(jvoisin) Make use of C23's stdckdint header: https://gustedt.gitlabpages.inria.fr/c23-library/#stdckdint */ /* + * We're not making use of C23's <stdckdint.h> since: + * - there is no elegant way to make it ignore the results. + * - it's tricky to make it type-agnostic when we don't care about the result. + * We're not making use of __builtin_mul_overflow for the same reasons. + * * See: * - https://gcc.gnu.org/onlinedocs/gcc/Integer-Overflow-Builtins.html * - https://clang.llvm.org/docs/LanguageExtensions.html#checked-arithmetic-builtins