From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 37510 invoked by alias); 30 Mar 2016 15:30:43 -0000 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 Received: (qmail 37414 invoked by uid 89); 30 Mar 2016 15:30:37 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Wed, 30 Mar 2016 15:30:35 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 8AC688F4EB; Wed, 30 Mar 2016 15:30:30 +0000 (UTC) Received: from [10.10.116.31] (ovpn-116-31.rdu2.redhat.com [10.10.116.31]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2UFUTc1032401; Wed, 30 Mar 2016 11:30:29 -0400 Subject: Re: [PATCH] c++/67376 Comparison with pointer to past-the-end, of array fails inside constant expression To: Martin Sebor , Jeff Law , Gcc Patch List References: <56E72C33.8000301@gmail.com> <56E9B9C3.5000908@redhat.com> <56EB1ECA.90800@gmail.com> <56EC3500.4030701@redhat.com> <56F03567.8040306@redhat.com> <56F07137.1050400@redhat.com> <56F19456.3030900@redhat.com> <56F1A494.1060407@gmail.com> <56F2EC3C.5000606@redhat.com> <56F9AA63.4090201@gmail.com> <56FACF51.5000407@redhat.com> <56FB4EBE.9000500@gmail.com> Cc: Marek Polacek , Jakub Jelinek From: Jason Merrill Message-ID: <56FBF112.6080806@redhat.com> Date: Wed, 30 Mar 2016 16:02:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56FB4EBE.9000500@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2016-03/txt/msg01608.txt.bz2 On 03/29/2016 11:57 PM, Martin Sebor wrote: >> Are we confident that arr[0] won't make it here as POINTER_PLUS_EXPR or >> some such? > > I'm as confident as I can be given that this is my first time > working in this area. Which piece of code or what assumption > in particular are you concerned about? I want to be sure that we don't fold these conditions to false. constexpr int *ip = 0; constexpr struct A { int ar[3]; } *ap = 0; static_assert(&ip[0] == 0); static_assert(&(ap->ar[0]) == 0); Jason