On 5/21/19 12:16 AM, Akim Demaille wrote:
I still use static inline, because with static only, GCC complains about unused functions. If you have suggestions on the gnulib recommended way of dealing with this, I'll adjust the code.
I'm not quite following what you're trying to do there (that's an enormous macro -- can't you do whatever you're doing without macros? :-). However, generally speaking static functions in .h files are a bad idea for C code, because a static function defined in a .h file cannot be called directly from an extern inline function defined in user code.
To prevent GCC from complaining about the unused functions, you can use a pragma; this should suffice if the static functions are not intended to be called directly from user code. Or you can make the functions extern inline instead of static inline; Gnulib has a bunch of *INLINE* macros for this.