Skip to content

Latest commit

 

History

History
58 lines (52 loc) · 2.12 KB

File metadata and controls

58 lines (52 loc) · 2.12 KB
title inline_recursion | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
devlang-cpp
ms.tgt_pltfrm
ms.topic article
f1_keywords
inline_recursion_CPP
vc-pragma.inline_recursion
dev_langs
C++
C
helpviewer_keywords
pragmas, inline_recursion
inline_recursion pragma
ms.assetid cfef5791-63b7-45ac-9574-623747b9b9c9
caps.latest.revision 8
author corob-msft
ms.author corob
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

inline_recursion

Controls the inline expansion of direct or mutually recursive function calls.

Syntax

  
#pragma inline_recursion( [{on | off}] )  

Remarks

Use this pragma to control functions marked as inline and __inline or functions that the compiler automatically expands under the /Ob2 option. Use of this pragma requires an /Ob compiler option setting of either 1 or 2. The default state for inline_recursion is off. This pragma takes effect at the first function call after the pragma is seen and does not affect the definition of the function.

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 one time. If inline_recursion is on, the function is expanded multiple times until it reaches the value set with the inline_depth pragma, the default value for recursive functions that is defined by the inline_depth pragma, or a capacity limit.

See Also

Pragma Directives and the __Pragma Keyword
inline_depth
/Ob (Inline Function Expansion)