Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756457AbXHQETy (ORCPT ); Fri, 17 Aug 2007 00:19:54 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752484AbXHQETt (ORCPT ); Fri, 17 Aug 2007 00:19:49 -0400 Received: from pentafluge.infradead.org ([213.146.154.40]:37879 "EHLO pentafluge.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752268AbXHQETr (ORCPT ); Fri, 17 Aug 2007 00:19:47 -0400 Date: Fri, 17 Aug 2007 10:02:13 +0530 (IST) From: Satyam Sharma X-X-Sender: satyam@enigma.security.iitk.ac.in To: Segher Boessenkool 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 Subject: Re: [PATCH 0/24] make atomic_read() behave consistently across all architectures In-Reply-To: <43eccf425e36943ce0411c3b504b1de2@kernel.crashing.org> Message-ID: 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 Content-Type: TEXT/PLAIN; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1141 Lines: 28 On Thu, 16 Aug 2007, Segher Boessenkool wrote: > > 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). > 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. - 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/