From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: GCC 4.9.1 suggests -std=c99 Date: Tue, 09 Sep 2014 18:50:22 +0300 Message-ID: <83tx4gaj41.fsf@gnu.org> References: <540F0EEE.6080603@yandex.ru> <540F15AE.4040106@cs.ucla.edu> <83vbowal4h.fsf@gnu.org> <540F1B12.2070603@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1410277856 23192 80.91.229.3 (9 Sep 2014 15:50:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 9 Sep 2014 15:50:56 +0000 (UTC) Cc: dmantipov@yandex.ru, emacs-devel@gnu.org To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Sep 09 17:50:49 2014 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 1XRNgu-000755-Ly for ged-emacs-devel@m.gmane.org; Tue, 09 Sep 2014 17:50:48 +0200 Original-Received: from localhost ([::1]:50520 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRNgu-0008OY-8D for ged-emacs-devel@m.gmane.org; Tue, 09 Sep 2014 11:50:48 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53097) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRNgR-0008OD-4n for emacs-devel@gnu.org; Tue, 09 Sep 2014 11:50:23 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XRNgM-000134-AA for emacs-devel@gnu.org; Tue, 09 Sep 2014 11:50:19 -0400 Original-Received: from mtaout28.012.net.il ([80.179.55.184]:35948) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XRNgM-00012i-2F for emacs-devel@gnu.org; Tue, 09 Sep 2014 11:50:14 -0400 Original-Received: from conversion-daemon.mtaout28.012.net.il by mtaout28.012.net.il (HyperSendmail v2007.08) id <0NBN00B0053NAE00@mtaout28.012.net.il> for emacs-devel@gnu.org; Tue, 09 Sep 2014 18:48:52 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout28.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0NBN0047Y59GXL70@mtaout28.012.net.il>; Tue, 09 Sep 2014 18:48:52 +0300 (IDT) In-reply-to: <540F1B12.2070603@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.184 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:174122 Archived-At: > Date: Tue, 09 Sep 2014 08:21:54 -0700 > From: Paul Eggert > CC: dmantipov@yandex.ru, emacs-devel@gnu.org > > Eli Zaretskii wrote: > > do we actually want to use such initializations inside a for loop? > > It's a better style, as it scopes the control variable better. And we > are assuming C99 in the trunk nowadays. > > It will be a portability problem only if we run into a pre-C99 compiler > that supports C99-style statements-before-declarations (which we're > already using in the trunk) but does not support a C99-style declaration > as the first clause of a for-loop. I'd be a bit surprised if such a > compiler were in current use (but then I've been surprised before ...). I think we should have discussed whether to use these C99 features before actually starting using them. Emacs definitely has certain coding style, which doesn't include these. I understand the rationale for using C99 features for which there's no reasonably practical alternatives, or rely on C99 semantics where earlier versions left things undefined. But the above don't belong to either class.