Re: inline funtcion of base class

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

 



On 20 August 2013 09:53, Hatt Tom wrote:
> Thanks for reply !
>
>
> I look into the disassembly instructions ,it show me that the call
> procedure of  B::func()  own its stack frame ,and its first
> instruction is push %ebp .
>
> so It is not dealed as a inline .

The compiler is not required to inline functions even if they're
declared as inline.  If you don't enable optimisations when compiling
there will be no function inlining.  Even with optimisations the
compiler might decide inlining the function would make it slower.

If you want to force the optimisers to inline it you can use the GNU
attribute always_inline.




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux