From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32245 invoked by alias); 16 Aug 2012 21:32:51 -0000 Received: (qmail 32235 invoked by uid 22791); 16 Aug 2012 21:32:50 -0000 X-SWARE-Spam-Status: No, hits=-4.8 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,KHOP_THREADED,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 16 Aug 2012 21:32:37 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1T27g9-0007ef-Nw from joseph_myers@mentor.com ; Thu, 16 Aug 2012 14:32:33 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Thu, 16 Aug 2012 14:32:33 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Thu, 16 Aug 2012 22:32:31 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1T27g6-0003K4-D9; Thu, 16 Aug 2012 21:32:30 +0000 Date: Thu, 16 Aug 2012 21:32:00 -0000 From: "Joseph S. Myers" To: Jakub Jelinek CC: , Jason Merrill , Paolo Carlini Subject: Re: [C PATCH] -Wsizeof-pointer-memaccess warning In-Reply-To: <20120816191033.GL1999@tucnak.redhat.com> Message-ID: References: <20120718124014.GH9077@tucnak.redhat.com> <20120815154852.GE1999@tucnak.redhat.com> <20120816191033.GL1999@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2012-08/txt/msg01106.txt.bz2 On Thu, 16 Aug 2012, Jakub Jelinek wrote: > Hi! > > On Wed, Aug 15, 2012 at 04:29:55PM +0000, Joseph S. Myers wrote: > > On Wed, 15 Aug 2012, Jakub Jelinek wrote: > > > > > I was mainly interested in whether such an approach is acceptable, or > > > whether I need to stop evaluating sizeof right away, create SIZEOF_EXPR > > > and only fold it during fully_fold*. I've briefly looked at that today, > > > > The approach is fine. Delaying evaluating sizeof is hard simply because > > of the expectation that integer constant expressions in general are > > evaluated early. > > Ok, thanks. Here is an updated patch, which gets away just with one global > variable (location_t computed from token after sizeof keyword in the > caller). Bootstrapped/regtested on x86_64-linux and i686-linux, ok for > trunk? This version is OK. -- Joseph S. Myers joseph@codesourcery.com