https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118005
--- Comment #4 from Alejandro Colomar <alx at kernel dot org> ---
Maaaybe I could do the following instead, I guess. I will probably do it
anyway, for compatibility with old GCC versions. I little bit more cpp(1), but
that's okay-ish too, I guess.
// <foo.h>:
#if (FOO_INTERNAL)
#define foo_inline inline
#else
#define foo_inline
#endif
foo_inline int foo(void);
#if (FOO_INTERNAL)
inline int
foo(void)
{
return 42;
}
#endif
// foo.c
#define FOO_INTERNAL
#include "foo.h"
extern inline int foo(void);