For example, a.h
static inline void asdf(int a) {}
b.h
static inline void asdf(int a) {}
is this ok? will there be any conflicts?
For example, a.h
static inline void asdf(int a) {}
b.h
static inline void asdf(int a) {}
is this ok? will there be any conflicts?
Technically, yes, it's ok. static functions are only visible in the same compilation unit.
Practically, no, it's not ok. It makes your code hard to read and if I had to maintain your code later I'd hate you for it. Either because the functions do different things or because they diverge over time because someone fixed a bug in one of them and forgot the other.
A static inline function does not need a declaration to be included in the header file.
You can have the declaration in the .c file where it is used.
e.g. a.c
static inline void asdf(int a);
....
static inline void asdf(int a)
{
....
}
In such a case the two different functions can be used in two files.
It will only be ok if no single source ever include both headers. If all .c files either include only a.h or only b.h or none, then all will be fine.
If both header were included in same source, you would get an error for redefinition of asdf.
An acceptable example would be if none of the .c files include directly a.h or b.h but only a c.h file containing:
#ifdef A_TYPE
#include a.h
#else
#include b.h
#endif
because the choice of the implementation would rely on a compile time constant