From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30452 invoked by alias); 3 Sep 2014 20:33:05 -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 30436 invoked by uid 89); 3 Sep 2014 20:33:04 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.6 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 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, 03 Sep 2014 20:33:03 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s83KX0dd032136 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 3 Sep 2014 16:33:01 -0400 Received: from [10.10.116.32] ([10.10.116.32]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s83KWxM6014895; Wed, 3 Sep 2014 16:32:59 -0400 Message-ID: <54077AF7.9070809@redhat.com> Date: Wed, 03 Sep 2014 20:33:00 -0000 From: Jason Merrill User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Paolo Carlini , "gcc-patches@gcc.gnu.org" Subject: Re: [C++ Patch] PR 58102 aka DR 1405 References: <5404790A.8020402@oracle.com> <5405CFF4.7060008@redhat.com> <5405D174.1050509@oracle.com> <5405D402.7020807@redhat.com> <5405DD3E.7030506@oracle.com> <5405E617.9020507@redhat.com> <5406F32D.80304@oracle.com> In-Reply-To: <5406F32D.80304@oracle.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2014-09/txt/msg00275.txt.bz2 On 09/03/2014 06:53 AM, Paolo Carlini wrote: > The issue, AFAICS, boils down to the difference itself between > cxx_eval_outermost_constant_expr and cxx_eval_constant_expression: > changing constant_value_1 means that in principle all the calls of the > latter (for VAR_DECLs) are impacted. Oh, right. > Thus, for example, for the call at > the beginning of cxx_eval_component_reference: > > struct A > { > int i; > mutable int j; > }; > > constexpr A a = { 0, 1 }; > constexpr int i = a.i; > > how do we avoid emitting a wrong error for the a of a.i? Perhaps when we get the value of a we replace the mutable initializer with a magic "mutable" value and then make sure what we return from _outermost_ doesn't contain it? Jason