Re: Inlined functions



On Mon, 2005-10-31 at 22:45 -0500, Robert Love wrote:

> Oh, I bet I know what happened.  The function is static.  And gcc
> realizes it is const.  And static const functions are merged into the
> caller if possible.  So the "42" was just pasted into the call site.  

Eh, I should have pointed out that "constant merging" is not really the
same as function inlining.

But -- it seems gcc will perform Morten's mysterious inlining if you
make the function (at least superficially) non-const.

So, still baffled.

	Robert Love





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]