Inline is an extension to C90 implemented by almost all compilers.
What we do is what the gcc manual suggest for ages:
This combination of `inline' and `extern' has almost the effect of a macro. The way to use it is to put a function definition in a header file with these keywords, and put another copy of the definition (lacking `inline' and `extern') in a library file. The definition in the header file will cause most calls to the function to be inlined. If any uses of the function remain, they will refer to the single copy in the library.
I don’t know why clang seems to be the only compiler who does not grok
this. Libgcrypt has been compiled on a wide range of compilers
without any problem.
Wait, I see. Clang pretends to be gcc and defines GNUC. Thus
mpi-internal.h includes the inline functions:
#ifdef __GNUC__ #include "mpi-inline.h" #endif
which is a valid gcc construct. As with some other bug reports; I can
only suggest to fix clang and don't have it define GNUC .