Subject: Re: bug#23640: 25.1.50; Getting rid of compiler warnings

From: Paul Eggert <[email-masked]>
Date: Wed, 1 Jun 2016 01:55:13 -0700

> Surely this makes the code easier to understand, since "int i = 0;"
> immediately shows that the variable is always initialised

That is a superficial form of understanding, one that could be satisfied by 
initializing all variables whether they need it or not. If instead we make it 
clear that the initialization is present only to work around a GCC deficiency, 
the reader will get a less-shallow understanding.

> any codebase has to deal with the world as it is,
> not the ideal in one of the applicable standards.

Yes, and Emacs was changed to work around the Cygnus and FreeBSD glitches; see:

http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=cb379cbb7fc617f897e7dbc3ce45bf99ea3d1f87

 > the performance cost of this is likely to be unmeasurably small

Yes, it's primarily about making the code clearer, not performance.

GCC is gradually getting smarter in this area, and eventually I hope we can 
remove more IF_LINT instances. I removed several instances recently; see:

http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=237244bbd5ce753bcdf79634561de515bd76c687