C4711“为内联扩展选择的函数”有什么用? Visual C++警告?
根据 MSDN Visual C++ 可以发出 C4711警告:如果编译器决定内联未标记为内联的函数,则选择函数 X 进行内联扩展。
我不明白这个警告有什么用处。假设我编译代码并看到此警告。现在怎么办?我为什么要关心?
According to MSDN Visual C++ can emit C4711 warning: function X selected for inline expansion if the compiler decides to inline a function 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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
默认情况下它没有打开。如果出于某种原因您想知道函数何时内联,您可以打开它。例如,如果代码大小非常重要,或者您希望从模块外部跳转到该函数,或者您需要程序集以某种方式查看,那么这可能是相关的。它还可以帮助跟踪代码生成错误。
这纯粹是信息性的。
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.