From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12892 invoked by alias); 4 May 2005 18:01:24 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 12826 invoked from network); 4 May 2005 18:01:21 -0000 Received: from unknown (HELO sadr.equallogic.com) (66.155.203.134) by sourceware.org with SMTP; 4 May 2005 18:01:21 -0000 Received: from sadr.equallogic.com (localhost.localdomain [127.0.0.1]) by sadr.equallogic.com (8.12.8/8.12.8) with ESMTP id j44I1GZd018142 for ; Wed, 4 May 2005 14:01:20 -0400 Received: from M31.equallogic.com (M31.equallogic.com [172.16.1.31]) by sadr.equallogic.com (8.12.8/8.12.8) with SMTP id j44I1FNj018104; Wed, 4 May 2005 14:01:16 -0400 Received: from pkoning.equallogic.com ([172.16.1.106]) by M31.equallogic.com with Microsoft SMTPSVC(6.0.3790.211); Wed, 4 May 2005 13:53:24 -0400 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17017.3091.38361.968548@gargle.gargle.HOWL> Date: Wed, 04 May 2005 18:01:00 -0000 From: Paul Koning To: dalej@apple.com Cc: gdr@integrable-solutions.net, gcc@gcc.gnu.org, nathan@codesourcery.com, aph@redhat.com, mrs@apple.com Subject: Re: volatile semantics References: <851D2CB0-93DF-4C49-A6A8-8895DB1A08F9@apple.com> <42778D99.7070904@codesourcery.com> <4277BCE0.3080004@codesourcery.com> <8a4d759a4b8deddfafa0304fbd8f032d@apple.com> <4277C874.7030205@codesourcery.com> <8161c8e7d83216d447812746e1790743@apple.com> <427882EA.90405@codesourcery.com> <17016.41280.64084.641018@cuddles.cambridge.redhat.com> X-OriginalArrivalTime: 04 May 2005 17:53:24.0838 (UTC) FILETIME=[2B382060:01C550D2] X-SW-Source: 2005-05/txt/msg00188.txt.bz2 >>>>> "Dale" == Dale Johannesen writes: Dale> On May 4, 2005, at 5:06 AM, Gabriel Dos Reis wrote: >> Andrew Haley writes: >> >> | Nathan Sidwell writes: | > Dale Johannesen wrote: >> | > >> | > > And we don't have to document the behavior at all; it is not >> documented | > > now. | > I disagree. It's not documented >> explicitly in gcc now, because it is doing | > what the std >> permits, and so documented there. We should document either >> | > >> | > a) that current gcc is not breaking the std, and Mike's >> example is invalid | > code, if one expects a volatile read. This >> would be a FAQ like thing. Dale> Both behaviors are standard-compliant. Treating a reference as Dale> volatile when you don't have to just means strictly following Dale> the rules of the abstract machine; it can never break anything. >> I vote for (a). >> >> [...] >> >> | This is a bad extension to gcc and will cause much trouble, just >> like | the old guarantee to preserve empty loops. Dale> I see a difference between a documented extension, and quietly Dale> choosing from among standard-compliant behaviors the one which Dale> is most convenient for users. I agree, but I would put it more strongly -- choose the interpretation which (a) satisfies the principle of least astonishment, (b) matches previous version behavior, and (c) will keep existing user code working rather than breaking it in hard to debug ways. paul