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 . 2013/8/20 Jonathan Wakely <jwakely.gcc@xxxxxxxxx>: > On 20 August 2013 06:02, Hatt Tom wrote: >> hi: >> Here is my example : >> >> class A { inline func();} >> >> class B:public A ; > > This code is not even valid C++. > >> If B calls func() ,is it dealed as inline ,which has no frame ? >> if I want to share one inline function from base class , what is the >> best mothod ? > > Yes, A::func() is an inline function. It is visible to the derived > class, but it is not accessible because it's private. If you make it > public or protected it will be accessible. > > This question is not about GCC so you should find a forum about > learning C++ to ask this sort of question, e.g. stackoverflow.com -- Best Regards!