From owner-freebsd-hackers@FreeBSD.ORG Sun May 17 16:04:28 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5068E1065670 for ; Sun, 17 May 2009 16:04:28 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from mx0.deglitch.com (backbone.deglitch.com [IPv6:2001:16d8:fffb:4::abba]) by mx1.freebsd.org (Postfix) with ESMTP id 032638FC1A for ; Sun, 17 May 2009 16:04:28 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from DSPAM-Daemon (localhost [127.0.0.1]) by mx0.deglitch.com (Postfix) with SMTP id E568D8FC1D for ; Sun, 17 May 2009 20:04:25 +0400 (MSD) Received: from orion.SpringDaemons.com (unknown [77.232.3.143]) by mx0.deglitch.com (Postfix) with ESMTPA id 60A5A8FC18; Sun, 17 May 2009 20:04:24 +0400 (MSD) Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id D832B3982B; Sun, 17 May 2009 20:04:56 +0400 (MSD) Date: Sun, 17 May 2009 20:04:56 +0400 From: Stanislav Sedov To: Christoph Mallon Message-Id: <20090517200456.cefa04fb.stas@FreeBSD.org> In-Reply-To: <4A1004B3.5040805@gmx.de> References: <49F4070C.2000108@gmx.de> <20090428114754.GB89235@server.vk2pj.dyndns.org> <49FAE4EA.1010205@gmx.de> <20090517144516.331b01a8.stas@FreeBSD.org> <4A1004B3.5040805@gmx.de> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-DSPAM-Result: Innocent X-DSPAM-Processed: Sun May 17 20:04:25 2009 X-DSPAM-Confidence: 0.9899 X-DSPAM-Improbability: 1 in 9809 chance of being spam X-DSPAM-Probability: 0.0000 X-DSPAM-Signature: 4a103589994292021119546 Cc: FreeBSD Hackers Subject: Re: C99: Suggestions for style(9) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 17 May 2009 16:04:28 -0000 On Sun, 17 May 2009 14:36:03 +0200 Christoph Mallon mentioned: > > > Aliasing behavior is stritcly described in > > ISO C99 standard, so there's a good point to enforcing strict-aliasing clear > > code in our kernel. > If you like this addition because of this reason, I have to disappoint > you: This addition has absolutly *nothing* to do with strict-aliasing. > I didn't meant I like this change only from aliasing point of view: certianly, the code readability argument is very important. But this change also works towards the strict aliasing problem solving too: there's just a less chance someone will reuse a variable, address of which was previously taken. > > On the other hand the big work should be done on clearing > > the existing code before any rule on this can be enforced. > This addition is about improving readability for humans, because it > simplifies the def-use-chains, and as a side effect sometimes leads to > better generated code. It is not sensible to check millions of lines of > code whether a variables are used in different contexts within a > function before this can added. > -- Stanislav Sedov ST4096-RIPE !DSPAM:4a103589994292021119546!