From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Wojciech Meyer Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] /srv/bzr/emacs/trunk r109864: Fix minor problems found by static checking. Date: Tue, 04 Sep 2012 19:22:44 +0100 Message-ID: References: <83392zf7bu.fsf@gnu.org> <504506E8.5070506@cs.ucla.edu> <83r4qieszx.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1346782980 11471 80.91.229.3 (4 Sep 2012 18:23:00 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 4 Sep 2012 18:23:00 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 04 20:23:02 2012 Return-path: Envelope-to: ged-emacs-devel@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 1T8xm8-0002Rs-GP for ged-emacs-devel@m.gmane.org; Tue, 04 Sep 2012 20:23:00 +0200 Original-Received: from localhost ([::1]:59174 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8xm5-0002i6-FT for ged-emacs-devel@m.gmane.org; Tue, 04 Sep 2012 14:22:57 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:33895) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8xm2-0002hO-Fz for emacs-devel@gnu.org; Tue, 04 Sep 2012 14:22:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T8xm1-0000a7-B5 for emacs-devel@gnu.org; Tue, 04 Sep 2012 14:22:54 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:54820) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T8xm1-0000Zv-43 for emacs-devel@gnu.org; Tue, 04 Sep 2012 14:22:53 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T8xm2-0002N9-8z for emacs-devel@gnu.org; Tue, 04 Sep 2012 20:22:54 +0200 Original-Received: from cpc1-cmbg12-0-0-cust201.5-4.cable.virginmedia.com ([86.9.116.202]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 Sep 2012 20:22:54 +0200 Original-Received: from wojciech.meyer by cpc1-cmbg12-0-0-cust201.5-4.cable.virginmedia.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 04 Sep 2012 20:22:54 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 22 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: cpc1-cmbg12-0-0-cust201.5-4.cable.virginmedia.com User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.94 (gnu/linux) Cancel-Lock: sha1:0wGPrN6nDDWnlLtqrueXv1Mqv18= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:153006 Archived-At: Stefan Monnier writes: >> GCC false alarms aside, are there any reasons to prefer separate >> declaration and initialization? > > There are software-engineering reasons to prefer the "initialize as part > of declare" so it's trivially obvious that the variable can't > be uninitialized. So in general, we'd first want to investigate other > solutions if such an "init within declare" causes problems. I would be also adding 'const' after such initialisation if not mutated later. > > > Stefan > > -- Wojciech Meyer http://danmey.org