Can anybody explain following function declaration.
inline uint64_t MY_FUNC(unsigned long param) __attribute__ ((pure, always_inline));
Can anybody explain following function declaration.
inline uint64_t MY_FUNC(unsigned long param) __attribute__ ((pure, always_inline));
inline uint64_t MY_FUNC(unsigned long param) __attribute__ ((pure, always_inline));
inline
-- function declared inline, either as optimization hint or for linking purposes.uint64_t
-- fixed-width return type. Refer to <stdint.h>
.MY_FUNC
-- function nameunsigned long
-- type of parameterparam
-- name of parameter__attribute__ ((pure, always_inline))
-- GCC compiler-specific attributes. See ouah who ninja'd their description.Voting to close as "too broad".
always_inline
andpure
aregcc
function attributes. From gcc documentation:Your
MY_FUNC
function already has theinline
function specifier but in Cinline
is only a suggestion to inline and the compiler has no obligation to inline the function.