Compiler Warning (level 4) C4714 (original) (raw)

function 'function' marked as __forceinline not inlined

Remarks

The given function was selected for inline expansion, but the compiler did not perform the inlining.

Although __forceinline is a stronger indication to the compiler than __inline, inlining is still performed at the compiler's discretion, but no heuristics are used to determine the benefits from inlining this function.

In some cases, the compiler will not inline a particular function for mechanical reasons. For example, the compiler will not inline:

Example

The following example generates C4714:

// C4714.cpp
// compile with: /Ob1 /GX /W4
__forceinline void func1()
{
   try
   {
   }
   catch (...)
   {
   }
}

void func2()
{
   func1();   // C4714
}

int main()
{
}