Reputation: 3176
In C, if I mark a function as inline
, and the compiler decides to inline the call, do all function calls from that function also become inlined?
Upvotes: 4
Views: 132
Reputation: 564901
In C, if I mark a function as inline, and the compiler decides to inline the call, do all function calls from that function also become inlined?
Not necessarily. Inlining a function just inlines that function body (if the compiler "agrees" to do so) - the called functions may be inlined themselves, but may not be, depending on their definition, etc.
Upvotes: 5