From 75f7f7092e5f4937ff2198568e70528710175c1e Mon Sep 17 00:00:00 2001 From: Yamagi Date: Sat, 8 Oct 2022 17:02:43 +0200 Subject: [PATCH] The `always_inline` does not inline the function... ...it just forces inline functions to be inlined, regardless of restrictions. --- src/common/header/shared.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/header/shared.h b/src/common/header/shared.h index b1483367..c5b5488e 100644 --- a/src/common/header/shared.h +++ b/src/common/header/shared.h @@ -61,7 +61,7 @@ typedef unsigned char byte; #define YQ2_ATTR_NORETURN _Noreturn # if defined(__GNUC__) #define YQ2_ATTR_MALLOC __attribute__ ((__malloc__)) - #define YQ2_ATTR_INLINE __attribute__((always_inline)) + #define YQ2_ATTR_INLINE __attribute__((always_inline)) inline # elif defined(_MSC_VER) #define YQ2_ATTR_MALLOC __declspec(restrict) # else @@ -75,7 +75,7 @@ typedef unsigned char byte; // must be used as prefix (YQ2_ATTR_NORETURN void bla();)! #define YQ2_ATTR_NORETURN __attribute__ ((noreturn)) #define YQ2_ATTR_MALLOC __attribute__ ((__malloc__)) - #define YQ2_ATTR_INLINE __attribute__((always_inline)) + #define YQ2_ATTR_INLINE __attribute__((always_inline)) inline #elif defined(_MSC_VER) // Note: We prefer VS2019 16.8 or newer in C11 mode (/std:c11), // then the __STDC_VERSION__ >= 201112L case above is used