From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1OSq2V-0001td-6S for garchives@archives.gentoo.org; Sun, 27 Jun 2010 11:28:47 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B2F4EE0AB5; Sun, 27 Jun 2010 11:28:41 +0000 (UTC) Received: from vms173005pub.verizon.net (vms173005pub.verizon.net [206.46.173.5]) by pigeon.gentoo.org (Postfix) with ESMTP id 3A0C6E0AA3 for ; Sun, 27 Jun 2010 11:28:36 +0000 (UTC) Received: from gw.thefreemanclan.net ([unknown] [96.245.231.248]) by vms173005.mailsrvcs.net (Sun Java(tm) System Messaging Server 7u2-7.02 32bit (built Apr 16 2009)) with ESMTPA id <0L4O006857VNORS5@vms173005.mailsrvcs.net> for gentoo-dev@lists.gentoo.org; Sun, 27 Jun 2010 06:28:35 -0500 (CDT) Received: from [192.168.0.5] (rich.homedns.org [192.168.0.5]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (No client certificate requested) by gw.thefreemanclan.net (Postfix) with ESMTPS id 343951759D26 for ; Sun, 27 Jun 2010 07:28:35 -0400 (EDT) Message-id: <4C2735E2.4050008@gentoo.org> Date: Sun, 27 Jun 2010 07:28:34 -0400 From: Richard Freeman User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100623 Thunderbird/3.0.5 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-version: 1.0 To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] FYI: Rules for distro-friendly packages References: <20100625201738.GA4789@nibiru.local> <4C252C8E.8020408@gentoo.org> <20100626193915.GD4789@nibiru.local> <20100626205001.365b51cb@snowcone> <20100626195733.GF4789@nibiru.local> <20100627090900.5378b5db@mosly> <20100627105204.GD23460@nibiru.local> In-reply-to: <20100627105204.GD23460@nibiru.local> Content-type: text/plain; charset=ISO-8859-1; format=flowed Content-transfer-encoding: 7bit X-Archives-Salt: f1212b99-0fbf-4104-94f4-03a24e7358a2 X-Archives-Hash: 6d81f165cf81bccdffa3093bcd8be53f On 06/27/2010 06:52 AM, Enrico Weigelt wrote: >> remark #981: operands are evaluated in unspecified order (tons of them) >> return strcmp( left.c_str(), right.c_str() )> 0; > > I'm not sure if this really qualifies an warning, since - AFAIK - > C spec never said, that there is an evaluation order for > function parameters. > I could see how somebody might make that assumption (incorrectly), and get burned by this. However, creating local variables just to hold intermediate results so as to not embed them in function calls seems to be a lot of overhead - certainly in terms of readability, and I can't think of a situation where the compiler would have to do it on its own. I guess religiously doing this might make the code less likely to contain very subtle bugs, but perhaps it is a bit over the top for anybody who wouldn't be otherwise developing in ADA. Rich