8#ifndef BOTAN_UTIL_COMPILER_FLAGS_H_
9#define BOTAN_UTIL_COMPILER_FLAGS_H_
20#if defined(__has_builtin)
21 #define BOTAN_COMPILER_HAS_BUILTIN(x) __has_builtin(x)
23 #define BOTAN_COMPILER_HAS_BUILTIN(x) 0
29#if defined(__has_attribute)
30 #define BOTAN_COMPILER_HAS_ATTRIBUTE(x) __has_attribute(x)
31 #define BOTAN_COMPILER_ATTRIBUTE(x) __attribute__((x))
33 #define BOTAN_COMPILER_HAS_ATTRIBUTE(x) 0
34 #define BOTAN_COMPILER_ATTRIBUTE(x)
43#if defined(__GNUC__) && defined(__loongarch64) && (__GNUC__ <= 14)
44 #define BOTAN_COMPILER_DOES_NOT_HAVE_TARGET_ATTRIBUTE
52#if BOTAN_COMPILER_HAS_ATTRIBUTE(target) && !defined(BOTAN_COMPILER_DOES_NOT_HAVE_TARGET_ATTRIBUTE)
53 #define BOTAN_FUNC_ISA(isa) BOTAN_COMPILER_ATTRIBUTE(target(isa))
55 #define BOTAN_FUNC_ISA(isa)
63#define BOTAN_FUNC_ISA_INLINE(isa) BOTAN_FUNC_ISA(isa) BOTAN_FORCE_INLINE
68#if BOTAN_COMPILER_HAS_ATTRIBUTE(init_priority)
69 #define BOTAN_EARLY_INIT(prio) BOTAN_COMPILER_ATTRIBUTE(init_priority(prio))
71 #define BOTAN_EARLY_INIT(prio)
77#if !defined(BOTAN_FORCE_INLINE)
79 #if BOTAN_COMPILER_HAS_ATTRIBUTE(always_inline)
80 #define BOTAN_FORCE_INLINE inline BOTAN_COMPILER_ATTRIBUTE(always_inline)
82 #elif defined(_MSC_VER)
83 #define BOTAN_FORCE_INLINE __forceinline
86 #define BOTAN_FORCE_INLINE inline
#define BOTAN_FUTURE_INTERNAL_HEADER(hdr)