public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jason Merrill <jason@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3492] c++: correct fold_operand change Date: Tue, 25 Oct 2022 18:05:40 +0000 (GMT) [thread overview] Message-ID: <20221025180540.9F2E93858432@sourceware.org> (raw) https://gcc.gnu.org/g:4a54873d7753068fe64e01efd5d8a06615bdb167 commit r13-3492-g4a54873d7753068fe64e01efd5d8a06615bdb167 Author: Jason Merrill <jason@redhat.com> Date: Tue Oct 25 13:54:12 2022 -0400 c++: correct fold_operand change Still want the conversion to bool. gcc/cp/ChangeLog: * constexpr.cc (find_failing_clause_r): Re-add the call to contextual_conv_bool. Diff: --- gcc/cp/constexpr.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gcc/cp/constexpr.cc b/gcc/cp/constexpr.cc index 39bb023b79c..15b4f2c4a08 100644 --- a/gcc/cp/constexpr.cc +++ b/gcc/cp/constexpr.cc @@ -1887,7 +1887,8 @@ find_failing_clause_r (const constexpr_ctx *ctx, tree expr) e = find_failing_clause_r (ctx, TREE_OPERAND (expr, 1)); return e; } - tree e = fold_operand (expr, ctx); + tree e = contextual_conv_bool (expr, tf_none); + e = fold_operand (e, ctx); if (integer_zerop (e)) /* This is the failing clause. */ return expr;
reply other threads:[~2022-10-25 18:05 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221025180540.9F2E93858432@sourceware.org \ --to=jason@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).