From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master b7fa6b1 1/4: Simplify use of FOR_EACH_TAIL Date: Mon, 6 Feb 2017 17:35:51 -0800 Organization: UCLA Computer Science Department Message-ID: <3c4ae804-8188-b767-c65a-d4e71d876502@cs.ucla.edu> References: <20170205213033.19755.8264@vcs.savannah.gnu.org> <20170205213034.20306220171@vcs.savannah.gnu.org> <83inon72kj.fsf@gnu.org> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------EEBF316E3BA82B103F43AA5A" X-Trace: blaine.gmane.org 1486431373 9492 195.159.176.226 (7 Feb 2017 01:36:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 7 Feb 2017 01:36:13 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 Cc: monnier@IRO.UMontreal.CA, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Feb 07 02:36:08 2017 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cauhU-0002E3-4V for ged-emacs-devel@m.gmane.org; Tue, 07 Feb 2017 02:36:08 +0100 Original-Received: from localhost ([::1]:51469 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cauhZ-0000j5-PV for ged-emacs-devel@m.gmane.org; Mon, 06 Feb 2017 20:36:13 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:39412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cauhQ-0000iy-1q for emacs-devel@gnu.org; Mon, 06 Feb 2017 20:36:06 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cauhN-0007RV-Nu for emacs-devel@gnu.org; Mon, 06 Feb 2017 20:36:04 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:55224) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cauhH-0007R0-O1; Mon, 06 Feb 2017 20:35:56 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 42A1416007E; Mon, 6 Feb 2017 17:35:54 -0800 (PST) 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 oRuySniiezgK; Mon, 6 Feb 2017 17:35:52 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 51FA416007F; Mon, 6 Feb 2017 17:35:52 -0800 (PST) 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 sqJOYKFDdL4v; Mon, 6 Feb 2017 17:35:52 -0800 (PST) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 3281E16007E; Mon, 6 Feb 2017 17:35:52 -0800 (PST) In-Reply-To: <83inon72kj.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:212070 Archived-At: This is a multi-part message in MIME format. --------------EEBF316E3BA82B103F43AA5A Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit On 02/06/2017 07:37 AM, Eli Zaretskii wrote: > Why is it so important to make sure it doesn't survive the loop? If > for optimizations, then I'd expect modern compilers to be smart enough > to produce the same code whether it does or doesn't survive. It's not so much compilers as human readers of the code. Admittedly it is a minor issue. > We have similar macros elsewhere, e.g. FOR_EACH_FRAME, > FOR_EACH_BUFFER, etc. It's IMO a pity to have this one different. Good point, I had forgotten about that. I installed the attached patch, which changes FOR_EACH_TAIL to act more like these other macros. That is. FOR_EACH_TAIL (tail) now updates 'tail' each time through the loop, and the caller needs to declare the 'tail' variable outside the loop; this is as it was before. --------------EEBF316E3BA82B103F43AA5A Content-Type: text/plain; charset=UTF-8; name="0001-Make-FOR_EACH_TAIL-more-like-other-FOR_EACH-macros.txt" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename*0="0001-Make-FOR_EACH_TAIL-more-like-other-FOR_EACH-macros.txt" RnJvbSAyYjdlZGVhMWMyNTU5Yjc5ZjUyZDAwOTRiNWJhMmNkMGQ2NzAwYmQyIE1vbiBTZXAg MTcgMDA6MDA6MDAgMjAwMQpGcm9tOiBQYXVsIEVnZ2VydCA8ZWdnZXJ0QGNzLnVjbGEuZWR1 PgpEYXRlOiBNb24sIDYgRmViIDIwMTcgMTc6MTU6MTQgLTA4MDAKU3ViamVjdDogW1BBVENI XSBNYWtlIEZPUl9FQUNIX1RBSUwgbW9yZSBsaWtlIG90aGVyIEZPUl9FQUNIIG1hY3JvcwpN SU1FLVZlcnNpb246IDEuMApDb250ZW50LVR5cGU6IHRleHQvcGxhaW47IGNoYXJzZXQ9VVRG LTgKQ29udGVudC1UcmFuc2Zlci1FbmNvZGluZzogOGJpdAoKU2VlIGNvbW1lbnRzIGJ5IFN0 ZWZhbiBNb25uaWVyIGluOgpodHRwOi8vbGlzdHMuZ251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