Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 620
sharptooth Avatar asked Feb 15 '11 06:02

sharptooth


1 Answers

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.

like image 181
Crashworks Avatar answered Sep 18 '22 15:09

Crashworks