Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759878AbXHQWp3 (ORCPT ); Fri, 17 Aug 2007 18:45:29 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755015AbXHQWpM (ORCPT ); Fri, 17 Aug 2007 18:45:12 -0400 Received: from gate.crashing.org ([63.228.1.57]:39401 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754668AbXHQWpK (ORCPT ); Fri, 17 Aug 2007 18:45:10 -0400 In-Reply-To: References: <20070809131423.GA9927@shell.boston.redhat.com> <46C2D6F3.3070707@s5r6.in-berlin.de> <20070815233721.91032366.billfink@mindspring.com> <43eccf425e36943ce0411c3b504b1de2@kernel.crashing.org> Mime-Version: 1.0 (Apple Message framework v623) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Cc: Christoph Lameter , heiko.carstens@de.ibm.com, horms@verge.net.au, Stefan Richter , Bill Fink , Linux Kernel Mailing List , "Paul E. McKenney" , netdev@vger.kernel.org, ak@suse.de, cfriesen@nortel.com, rpjday@mindspring.com, jesper.juhl@gmail.com, linux-arch@vger.kernel.org, Andrew Morton , zlynx@acm.org, schwidefsky@de.ibm.com, Chris Snook , Herbert Xu , davem@davemloft.net, Linus Torvalds , wensong@linux-vs.org, wjiang@resilience.com From: Segher Boessenkool Subject: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures Date: Sat, 18 Aug 2007 00:38:12 +0200 To: Satyam Sharma X-Mailer: Apple Mail (2.623) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1334 Lines: 39 >>> Here, I should obviously admit that the semantics of *(volatile int >>> *)& >>> aren't any neater or well-defined in the _language standard_ at all. >>> The >>> standard does say (verbatim) "precisely what constitutes as access to >>> object of volatile-qualified type is implementation-defined", but GCC >>> does help us out here by doing the right thing. >> >> Where do you get that idea? > > Try a testcase (experimentally verify). That doesn't prove anything. Experiments can only disprove things. >> GCC manual, section 6.1, "When >> is a Volatile Object Accessed?" doesn't say anything of the >> kind. > > True, "implementation-defined" as per the C standard _is_ supposed to > mean > "unspecified behaviour where each implementation documents how the > choice > is made". So ok, probably GCC isn't "documenting" this > implementation-defined behaviour which it is supposed to, but can't > really > fault them much for this, probably. GCC _is_ documenting this, namely in this section 6.1. It doesn't mention volatile-casted stuff. Draw your own conclusions. Segher - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/