Ответ 1
В GCC вы можете использовать опцию -Winline
для компилятора:
-Winline Warn if a function can not be inlined and it was declared as inline.
Файл man
для gcc продолжает:
Even with this option, the compiler will not warn about failures to inline functions declared in system headers. The compiler uses a variety of heuristics to determine whether or not to inline a function. For example, the compiler takes into account the size of the function being inlined and the amount of inlining that has already been done in the current function. Therefore, seemingly insignificant changes in the source program can cause the warnings produced by -Winline to appear or disappear.