From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18361 invoked by alias); 4 May 2005 23:24:42 -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 16977 invoked from network); 4 May 2005 23:24:13 -0000 Received: from unknown (HELO wproxy.gmail.com) (64.233.184.199) by sourceware.org with SMTP; 4 May 2005 23:24:13 -0000 Received: by wproxy.gmail.com with SMTP id 69so341721wra for ; Wed, 04 May 2005 16:24:12 -0700 (PDT) Received: by 10.54.122.7 with SMTP id u7mr609841wrc; Wed, 04 May 2005 16:24:12 -0700 (PDT) Received: by 10.54.23.53 with HTTP; Wed, 4 May 2005 16:24:12 -0700 (PDT) Message-ID: <325e93670505041624262d6e2c@mail.gmail.com> Date: Thu, 05 May 2005 00:04:00 -0000 From: Jeroen Dobbelaere Reply-To: Jeroen Dobbelaere To: James E Wilson Subject: Re: restrict and char pointers Cc: gcc@gcc.gnu.org In-Reply-To: <1115247081.5426.144.camel@aretha.corp.specifixinc.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <325e936705050403014a64b854@mail.gmail.com> <4279309B.2070401@specifixinc.com> <325e9367050504142739d0d62d@mail.gmail.com> <1115247081.5426.144.camel@aretha.corp.specifixinc.com> X-SW-Source: 2005-05/txt/msg00215.txt.bz2 On 5/4/05, James E Wilson wrote: [..] > The standard says "A translator is free to ignore any or all aliasing > implications of restrict". So there is no conflict with the standard > here. We are free to do as little optimization as we want, and in the > case of a restricted char pointer, we do none. I'm aware of that. The reason are asked for more clarity is that I think gcc should do better (as in the example I gave), but I want to be sure that this is still allowed by the standard. [..] > /* No two restricted pointers can point at the same thing. > However, a restricted pointer can point at the same thing > as an unrestricted pointer, if that unrestricted pointer > is based on the restricted pointer. So, we make the > alias set for the restricted pointer a subset of the > alias set for the type pointed to by the type of the > decl. */ [..] >From what I found on these pages I refered to, this could be made more str= ict : accesses through restricted pointers would not interfere with other accesse= s, which would allow some more aggressive optimizations. Greetings, --=20 Jeroen Dobbelaere