C Language and Libraries Help (clang.hlp) (Table of Contents; Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
inline_depth, inline_recursion
                                             Up Contents Index Back
─────C/C++ Language─────────────────────────────────────────────────────────
 
  Pragma:   inline_depth, inline_recursion
 
  Syntax:   #pragma inline_depth( [0..255] )
            #pragma inline_recursion( [on | off] )
 
  Summary:  The inline_depth pragma controls the number of times that
            inline expansion can occur. The inline_recursion pragma
            controls the inline expansion of directly or mutually
            recursive functions. Use these pragmas to control functions
            marked with the inline or __inline keywords, or functions
            that the compiler automatically expands under the /Ob2
            switch. Both pragmas require an /Ob command-line switch
            setting of either 1 or 2.
 
  See also: /Ob, auto_inline
 
     The inline_depth pragma controls the number of times a series
     of function calls can be expanded. For example, if the inline depth
     is four, and if A calls B and B then calls C, all three calls will
     be expanded inline. However, if the closest inline expansion is two,
     only A and B are expanded, and C remains as a function call. By
     default, the value of inline_depth is eight.
 
     The inline_recursion pragma controls how recursive functions are
     expanded. If inline_recursion is off, and if an inline function
     calls itself (either directly or indirectly), the function is
     expanded only once. If inline_recursion is on, the function is
     expanded multiple times until the value of inline_depth is reached
     or capacity limits are reached. By default, inline_recursion is off.
 
     The inline depth can be decreased during expansion but not
     increased. If the inline depth is six and during expansion the
     preprocessor encounters an inline_depth pragma with a value of
     eight, the depth remains six.
 
     An inline depth of 0 inhibits inline expansion; an inline depth of
     255 places no limit on inline expansion.
 
     If either pragma is used without specifying a value, the default
     value is used.
                                    -♦-