I understand that "inline" by itself is a suggestion to the compiler, and at its descretion it may or may not inline the function, and it will also produce linkable object code.
I think that "static inline" does the same (may or may not inline) but will not produce linkable object code when inlined (since no other module could link to it).
Where does "extern inline" fit into the picture?
Assume I want to replace a preprocessor macro by an inline function and require that this function gets inlined (e.g., because it uses the __FILE__ and __LINE__ macros which should resolve for the caller but not this called function). That is, I want to see a compiler or linker error in case the function does not get inlined. Does "extern inline" do this? (I assume that, if it does not, there is no way to achieve this behavior other than sticking with a macro.)
Are there differences between C++ and C?
Are there differences between different compiler vendors and versions?