When it comes to inline, maybe you're still parked more than 10 years ago even more than 20 years ago in the C + + code, C + + has inline keyword inline, and even used to distinguish it from c. C99 start C introduced INLINE,GCC than C99 early implementation of the inline support, VC c no keyword Inline,inline can only be used in C + +, but there is another keyword __inline, but if you want to compile GCC C code with VC, The CL complaint does not recognize inline, as long as the inline is defined as __inline in the precompiled macro.
There is also a noinline in the GCC compiler attribute, with the inline why a noinline is needed. No use of inline is equal to noinline. There are also always_inline properties. Because in practice, the definition of inline is not necessarily all inline, and the inner end is determined by the GCC compiler, but your declaration will affect its decision. Similarly you are not defined as inline, the function is not necessarily isolated inline, the compiler in the optimization will usually decide for you to inline a number of functions, regardless of the size of the function is small or large. The Noinline and Always_inline attributes are literally the same.
Just recently debugging FFmpeg code, encountered an example, used for illustration:
FFmpeg is a C code project.
Avformat_write_header is a function with only 10 rows, which is called other functions.
Init_muxer is a large, static function that is not defined as inline, but is inline with a function (Avformat_write_header) that is small in size.
GCC does not have a sensual, static function is inline