From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 108282 invoked by alias); 14 Sep 2018 17:36:57 -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 108249 invoked by uid 89); 14 Sep 2018 17:36:56 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,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 ESMTP; Fri, 14 Sep 2018 17:36:55 +0000 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 308E21B9B for ; Fri, 14 Sep 2018 17:36:54 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-68.ams2.redhat.com [10.36.116.68]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C85CF2010CF1; Fri, 14 Sep 2018 17:36:51 +0000 (UTC) Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.15.2/8.15.2) with ESMTP id w8EHanQs023589; Fri, 14 Sep 2018 19:36:49 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id w8EHalfB023588; Fri, 14 Sep 2018 19:36:47 +0200 Date: Fri, 14 Sep 2018 17:41:00 -0000 From: Jakub Jelinek To: Marek Polacek Cc: GCC Patches , Jason Merrill Subject: Re: C++ PATCH to implement P1064R0, Virtual Function Calls in Constant Expressions Message-ID: <20180914173647.GR8250@tucnak> Reply-To: Jakub Jelinek References: <20180914171950.GE5587@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180914171950.GE5587@redhat.com> User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-09/txt/msg00775.txt.bz2 On Fri, Sep 14, 2018 at 01:19:50PM -0400, Marek Polacek wrote: > + /* We expect something in the form of &x.D.2103.D.2094; get x. */ > + if (TREE_CODE (obj) != ADDR_EXPR) > + return t; Shouldn't it then be a gcc_assert instead, or code like: if (TREE_CODE (obj) != ADDR_EXPR) { if (!ctx->quiet) error (...); *non_constant_p = true; } to make it clear that we haven't handled it and don't consider it a constant expression? Jakub