#include <stdlib.h> inline int f0(int a) { return a*a; } inline int f1(int a) { return a*a*a; } int main() { int (*f)(int); f = rand()%2 ? f0 : f1; return f(rand()); } So with gcc, asm file generated is same with or without inline. Is it same with any code with function pointers?
inlinewhen the decide whether they inline something. It definitely can ignore it and I'd be surprised if presence ofinlinehad much influence on the heuristic that decides that.