From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 53202 invoked by alias); 19 Dec 2018 10:19:42 -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 53192 invoked by uid 89); 19 Dec 2018 10:19:42 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 spammy=retry 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; Wed, 19 Dec 2018 10:19:40 +0000 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B69E0C00C10B for ; Wed, 19 Dec 2018 10:19:39 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-117-214.ams2.redhat.com [10.36.117.214]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 5C4C76B463; Wed, 19 Dec 2018 10:19:39 +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 wBJAJb9F027986; Wed, 19 Dec 2018 11:19:37 +0100 Received: (from jakub@localhost) by tucnak.zalov.cz (8.15.2/8.15.2/Submit) id wBJAJZAf027985; Wed, 19 Dec 2018 11:19:35 +0100 Date: Wed, 19 Dec 2018 10:19:00 -0000 From: Jakub Jelinek To: Jason Merrill Cc: gcc-patches@gcc.gnu.org Subject: Patch ping (Re: [C++ PATCH] Fix __builtin_{is_constant_evaluated,constant_p} handling in static_assert (PR c++/86524, PR c++/88446)) Message-ID: <20181219101935.GX23305@tucnak> Reply-To: Jakub Jelinek References: <20181212223037.GL12380@tucnak> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181212223037.GL12380@tucnak> User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2018-12/txt/msg01374.txt.bz2 Hi! On Wed, Dec 12, 2018 at 11:30:37PM +0100, Jakub Jelinek wrote: > 2018-12-12 Jakub Jelinek > > PR c++/86524 > PR c++/88446 > * cp-tree.h (fold_non_dependent_expr): Add manifestly_const_eval > argument. > * constexpr.c (cxx_eval_builtin_function_call): Evaluate > __builtin_constant_p if ctx->manifestly_const_eval even in constexpr > functions. For arguments to builtins, if ctx->manifestly_const_eval > try to first evaluate arguments with it, but if that doesn't result > in a constant expression, retry without it. Fix comment typo. > (fold_non_dependent_expr): Add manifestly_const_eval argument, pass > it through to cxx_eval_outermost_constant_expr and > maybe_constant_value. > * semantics.c (finish_static_assert): Call fold_non_dependent_expr > with true as manifestly_const_eval. > > * g++.dg/cpp1y/constexpr-86524.C: New test. > * g++.dg/cpp2a/is-constant-evaluated4.C: New test. > * g++.dg/cpp2a/is-constant-evaluated5.C: New test. > * g++.dg/cpp2a/is-constant-evaluated6.C: New test. I'd like to ping this patch. Thanks. Jakub