Re: Inlined functions
- From: Robert Love <rml novell com>
- To: Morten Welinder <mwelinder gmail com>
- Cc: Performance-list gnome org
- Subject: Re: Inlined functions
- Date: Mon, 31 Oct 2005 22:52:31 -0500
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]