The compiler determines whether to inline a function based on the settings of the ANSI Keywords Only item, and the Inline Depth, Auto-inline, and Deferred Inlining items in the C/C++ Language Panel.
If you turn off the ANSI Keywords Only option, you can declare C functions to be inline. The inlining items in the C/C++ Language Panel let you choose to inline no functions, only functions declared inline, or all small functions as shown in Table 3.2.
|
This option
|
Does this
|
|---|---|
The Smart item and items 1 to 8 in the Inline Depth pop-up menu correspond to the pragma inline_depth ("C/C++ Language Panel"). To check whether this option is on, use __option(inline_depth), described at "Checking Options".
The Don't Inline item in the Inline Depth pop-up menu corresponds to the pragma dont_inline, described at "dont_inline." To check whether this option is on, use __option (dont_inline), described at "dont_inline." By default, this option is off.
The Auto-Inline option lets the compiler choose which functions to inline. Also inlines C++ functions declared inline and member functions defined within a class declaration. This option corresponds to the pragma auto_inline, described at "auto_inline." To check whether this option is on, use __option (auto_inline), described at "auto_inline." By default, this option is off.
The Deferred Inlining option tells the compiler to inline functions that have not been defined yet. This option corresponds to the pragma auto_inline, described at "defer_codegen." To check whether this option is on, use __option (defer_codegen), described at "defer_codegen."