[Top][All Lists]

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

bug#23640: 25.1.50; Getting rid of compiler warnings

From: Paul Eggert
Subject: bug#23640: 25.1.50; Getting rid of compiler warnings
Date: Wed, 1 Jun 2016 01:55:13 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0

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:


> 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:


reply via email to

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