|
From: | Paul Eggert |
Subject: | Re: Suspicious warning in W64 build |
Date: | Sun, 17 Sep 2017 10:07:42 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 |
Eli Zaretskii wrote:
No, it's appropriate. UNINIT is merely a declaration directive. It tells GCC "This variable is not initialized and that is OK; don't warn me about it, I know that the initial value is never used even though you may not know." The current UNINIT implementation would still work even if we were to change the Lisp_Object representation so that all-zero would become invalid, because UNINIT declares that the invalid value will not be used.UNINIT looked inappropriate to initialize a Lisp_Object which is supposed to be a number.
No code should depend on UNINIT initializing to zero, as this is not true in general.
Although args[0] stops GCC from complaining, it is less useful than UNINIT because it will make cleanup more difficult in the future. We're already using UNINIT for Lisp_Object variables elsewhere, so we already know it's safe to use here.
[Prev in Thread] | Current Thread | [Next in Thread] |