The always_inline Function Attribute

Function attribute always_inline instructs the compiler to inline an inline function, regardless of whether optimization was specified at compile time. However, the attribute has no effect if the program is compiled at no-opt levels. Specifying this attribute for a function without an inline specification also has no effect. The attribute takes precedence over inlining compiler options. The language feature is an orthogonal extension to C89, C99, Standard C++ and C++98, and has been implemented to facilitate porting programs developed with GNU C and C++.

The syntax is shown in the following diagram.

>>-__attribute__--((--+-always_inline-----+--))----------------><
                      '-__always_inline__-'
 
 

Related References

IBM Copyright 2003