5.25 Restriction on overriding compiler decisions about function inlining

You can enable and disable function inlining, but you cannot override decisions the compiler makes about when it is practical to inline a function.

For example, you cannot force a function to be inlined if the compiler thinks it is not sensible to do so. Even if you use --forceinline or __forceinline, the compiler only inlines functions if it is possible to do so.

Related concepts
5.20 Inline functions
5.21 Compiler decisions on function inlining
5.22 Automatic function inlining and static functions
5.23 Inline functions and removal of unused out-of-line functions at link time
5.24 Automatic function inlining and multifile compilation
5.26 Compiler modes and inline functions
5.27 Inline functions in C++ and C90 mode
5.28 Inline functions in C99 mode
5.29 Inline functions and debugging
Related reference
8.15 --autoinline, --no_autoinline
8.83 --forceinline
10.6 __forceinline
10.8 __inline
8.106 --inline, --no_inline
Non-ConfidentialPDF file icon PDF versionARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.