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));
DevSolar
On
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".
Copyright © 2021 Jogjafile Inc.
always_inlineandpurearegccfunction attributes. From gcc documentation:Your
MY_FUNCfunction already has theinlinefunction specifier but in Cinlineis only a suggestion to inline and the compiler has no obligation to inline the function.