3.7.10. Inline

The inline function qualifier specifies that the function is to be inlined.

static inline foo (){...}

foo is used internally to the file, and the symbol is not exported.

inline foo(){...}

foo is used internally to the file and an out of line version is made available and the name foo exported.

extern inline foo (){...}

In GNU mode, foo is used internally if it is inlined. If it is not inlined then an external version is referenced rather than using a call to the internal version. Also, the foo symbol is not emitted.

In non-GNU mode, extern is ignored and the functionality is the same as inline foo() for C++. In C, you must use __inline. See Extern inline functions for more information.


Supported in GNU mode only for C90.

Copyright © 2007, 2010 ARM Limited. All rights reserved.ARM DUI 0348A