From f05fdeb727a2fc8052900a159c225d328d603acc Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Fri, 5 Dec 2025 20:43:23 +0100 Subject: Second commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- libj2.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'libj2.h') diff --git a/libj2.h b/libj2.h index 0c3d882..aa1747f 100644 --- a/libj2.h +++ b/libj2.h @@ -9,10 +9,20 @@ #if 1 # if defined(__GNUC__) # define LIBJ2_USE_GCC_INTRINSIC_FUNCTIONS_ +# if !defined(__clang__) +# define LIBJ2_USE_GCC_PARITYG_ +# endif # endif #endif +#if defined(__GNUC__) +# define LIBJ2_PURE_ __attribute__((__pure__)) +#else +# define LIBJ2_PURE_ +#endif + + /** * The number of bits in an `uintmax_t` */ @@ -48,6 +58,7 @@ struct libj2_j2u { #include "libj2/unsigned-comparsion.h" #include "libj2/bitwise-logic.h" #include "libj2/bit-shifting.h" +#include "libj2/bit-scanning.h" #include "libj2/sign-shifting.h" #include "libj2/addition.h" #include "libj2/subtraction.h" @@ -58,5 +69,6 @@ struct libj2_j2u { #if defined(LIBJ2_USE_GCC_INTRINSIC_FUNCTIONS_) # undef LIBJ2_USE_GCC_INTRINSIC_FUNCTIONS_ #endif +#undef LIBJ2_PURE_ #endif -- cgit v1.2.3-70-g09d2