If I do not declare the function f as inline. Similar:
hijras:
X f(Y y);
a.cpp:
X f(Y y) { ... }
Then in another translation unit:
B.cpp:
#include "Ah" Z g(W w) { ... ... f(...) ... ... }
Then I will compile the two translation units Ao and Bo with gcc 4.6, and then link them through gcc as well. (Perhaps with -O3 in both steps)
Will gcc consider a built-in function for performance during a connection? Or is it too late?
In a code review, someone suggested that I should not declare my functions as built-in, since the compiler knows better than I do when I connect. I was always impressed if the function is not defined in the header, than the compiler is not able to embed it.
(If the answer is different for C mode, C ++ or gnu ++ 0x mode, please indicate this as well)
source share