Hi,
I just tried and if the inline function specifier is present only in the function definition or only in the declaration or in both files, then the function becomes inline.
I thought that, in C, the compiler should give a "mismatch" error if the inline specifier is present in ONLY in the function definition (source file) or ONLY in the declaration (header file). Otherwise, when reading the code someone either must always check every function's declaration
and definition or, if he does not, then he might not be aware the function has been made inline.
Is it like that by design and am missing something in the logic? Or is it just a left-over from legacy (perhaps for backwards compatibility)?
Thank you