开发者

What's the use of C4711 "function selected for inline expansion" Visual C++ warning?

开发者 https://www.devze.com 2023-02-10 06:55 出处:网络
According to MSDN Visual C++ can emit C4711 warning: function X selected for inline expansion if the compiler decides to inline a functi开发者_高级运维on that was not marked inline.

According to MSDN Visual C++ can emit C4711 warning: function X selected for inline expansion if the compiler decides to inline a functi开发者_高级运维on that was not marked inline.

I don't see how this warning can be useful. Suppose I compile my code and see this warning. Now what? Why would I care?


It isn't on by default. You can turn it on if for some reason you'd like to know when functions are inlined. This can be relevant if, say, code size is at a severe premium, or you were expecting to jump into the function from outside the module, or you need the assembly to look a certain way. It can help track down code generation bugs as well.

It's purely informational.

0

精彩评论

暂无评论...
验证码 换一张
取 消