[Top][All Lists]

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

Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c

From: Paul Eggert
Subject: Re: [Emacs-diffs] master 6cd5678: Clarify compiler-pacifier in frame.c
Date: Mon, 26 Aug 2019 01:15:51 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

Eli Zaretskii wrote:

The warnings will re-appear if one
compiles outside of Git with suitable GCC options, so the solution is
incomplete at best.

We can't (and shouldn't try to) defend against people compiling Emacs with arbitrary-chosen GCC warning options, as there would be far too many false alarms. The best we can do is pacify GCC when a reasonable set of warning options is used, where "reasonable" is up to us (and is automated by 'configure').

Admittedly UNINIT is a bit of a kludge, but it's the best kludge we have in the

An explicit initialization is a tad better, as it doesn't require any
tinkering with obscure settings.

Neither should UNINIT require tinkering, if users employ default configuration settings.

Explicit initialization uses plain C rather than the awkward UNINIT macro, and that is a plus for explicit initialization. However, that's a style issue, and for me it's outweighed by the technical advantage of aiding automated debugging tools that I use occasionally. For these tools it is helpful to say that a variable is not initialized, because that helps catch use-before-set errors. An explicit initialization would cause these use-before-set bugs to go uncaught by these debugging tools.

reply via email to

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