From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#23640: 25.1.50; Getting rid of compiler warnings Date: Wed, 1 Jun 2016 01:55:13 -0700 Organization: UCLA Computer Science Department Message-ID: <574EA2F1.3070100@cs.ucla.edu> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1464771494 18813 80.91.229.3 (1 Jun 2016 08:58:14 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 1 Jun 2016 08:58:14 +0000 (UTC) Cc: 23640@debbugs.gnu.org To: Andy Moreton Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Jun 01 10:58:01 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1b81yR-0000wG-SZ for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jun 2016 10:58:00 +0200 Original-Received: from localhost ([::1]:41046 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b81yR-00050E-4m for geb-bug-gnu-emacs@m.gmane.org; Wed, 01 Jun 2016 04:57:59 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47142) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b81wc-0003aj-BE for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2016 04:56:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b81wY-0007zl-6Y for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2016 04:56:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:36735) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b81wX-0007zQ-V8 for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2016 04:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1b81wX-0002dJ-OO for bug-gnu-emacs@gnu.org; Wed, 01 Jun 2016 04:56:01 -0400 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Paul Eggert Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 01 Jun 2016 08:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23640 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 23640-submit@debbugs.gnu.org id=B23640.146477132210072 (code B ref 23640); Wed, 01 Jun 2016 08:56:01 +0000 Original-Received: (at 23640) by debbugs.gnu.org; 1 Jun 2016 08:55:22 +0000 Original-Received: from localhost ([127.0.0.1]:49072 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b81vu-0002cN-1Z for submit@debbugs.gnu.org; Wed, 01 Jun 2016 04:55:22 -0400 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:35536) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1b81vs-0002cC-PE for 23640@debbugs.gnu.org; Wed, 01 Jun 2016 04:55:21 -0400 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 38E951613FF; Wed, 1 Jun 2016 01:55:15 -0700 (PDT) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id 8kzXdqu5TalN; Wed, 1 Jun 2016 01:55:13 -0700 (PDT) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D6081161406; Wed, 1 Jun 2016 01:55:13 -0700 (PDT) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id OD98UsIMj_Ho; Wed, 1 Jun 2016 01:55:13 -0700 (PDT) Original-Received: from [192.168.1.9] (unknown [100.32.155.148]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id AE5C01613FF; Wed, 1 Jun 2016 01:55:13 -0700 (PDT) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:118924 Archived-At: > Surely this makes the code easier to understand, since "int i =3D 0;" > immediately shows that the variable is always initialised That is a superficial form of understanding, one that could be satisfied = by=20 initializing all variables whether they need it or not. If instead we mak= e it=20 clear that the initialization is present only to work around a GCC defici= ency,=20 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=3Dcb379cbb7fc617f89= 7e7dbc3ce45bf99ea3d1f87 > 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 c= an=20 remove more IF_LINT instances. I removed several instances recently; see: http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3D237244bbd5ce753bc= df79634561de515bd76c687