[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: argmatch: accept perfect matches in documented arglists

From: Paul Eggert
Subject: Re: argmatch: accept perfect matches in documented arglists
Date: Tue, 21 May 2019 09:18:29 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]