public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3492] c++: correct fold_operand change
@ 2022-10-25 18:05 Jason Merrill
  0 siblings, 0 replies; only message in thread
From: Jason Merrill @ 2022-10-25 18:05 UTC (permalink / raw)
  To: gcc-cvs

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;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-25 18:05 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-25 18:05 [gcc r13-3492] c++: correct fold_operand change Jason Merrill

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).