bug-texinfo
[Top][All Lists]
Advanced

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

Re: -Wlto-type-mismatch warning in error()


From: Paul Eggert
Subject: Re: -Wlto-type-mismatch warning in error()
Date: Sat, 10 Dec 2022 13:42:33 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2

On 2022-12-09 17:48, Gavin Smith wrote:
Since I went through the process of making all the symbols in that file
(besides main) local, here's the patch that does that
Thanks but no thanks.  install-info.c is a single-file program so there's
no point in adding the static keyword everywhere.

On the contrary, not only can adding 'static' prevent future issues like this with other symbols, it can help compilers generate better code in cases where adding 'static' lets them easily infer that a function cannot be called from outside the current compilation unit.

As a general rule in C, it's good to make all symbols static unless they really need to be extern.



reply via email to

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