inline funtcion of base class

Hatt Tom
Wed Aug 21 01:29:00 GMT 2013

OK! I will   try  it  !


2013/8/20 Jonathan Wakely <>:
> 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.

Best Regards!

More information about the Gcc-help mailing list