From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id A4749384400A for ; Fri, 11 Sep 2020 15:05:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A4749384400A Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-365-tibvJa-9M3mFZhI0vet9CQ-1; Fri, 11 Sep 2020 11:05:15 -0400 X-MC-Unique: tibvJa-9M3mFZhI0vet9CQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6FB438CD541; Fri, 11 Sep 2020 15:05:14 +0000 (UTC) Received: from redhat.com (ovpn-115-92.rdu2.redhat.com [10.10.115.92]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DC5911002D41; Fri, 11 Sep 2020 15:05:13 +0000 (UTC) Date: Fri, 11 Sep 2020 11:05:12 -0400 From: Marek Polacek To: Nathan Sidwell Cc: GCC Patches , Jason Merrill Subject: Re: [PATCH] c++: Remove LOOKUP_CONSTINIT. Message-ID: <20200911150512.GF5926@redhat.com> References: <20200911021547.503751-1-polacek@redhat.com> MIME-Version: 1.0 In-Reply-To: X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0.002 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2020 15:05:20 -0000 On Fri, Sep 11, 2020 at 10:57:21AM -0400, Nathan Sidwell wrote: > On 9/10/20 10:15 PM, Marek Polacek via Gcc-patches wrote: > > Since we now have DECL_DECLARED_CONSTINIT_P, we no longer need > > LOOKUP_CONSTINIT. > > > > Bootstrapped/regtested on x86_64-pc-linux-gnu, ok for trunk? > > looks good, thanks for noticing. BTW, you now have > > /* Set constexpr flag on vars (functions got it in grokfndecl). */ > > if (constexpr_p && VAR_P (decl)) > > DECL_DECLARED_CONSTEXPR_P (decl) = true; > > + /* And the constinit flag (which only applies to variables). */ > > + else if (constinit_p && VAR_P (decl)) > > + DECL_DECLARED_CONSTINIT_P (decl) = true; > > might that be clearer as > if (VAR_P (decl)) > { constexpr stuff constinit stuff } > > ? Ok either way Agreed, it'd be nicer to factor VAR_P out. I'll make that change. Thanks, Marek