c++: Remove unused parameter
authorMarek Polacek <polacek@redhat.com>
Thu, 21 Apr 2022 14:27:38 +0000 (10:27 -0400)
committerMarek Polacek <polacek@redhat.com>
Thu, 21 Apr 2022 14:29:04 +0000 (10:29 -0400)
gcc/cp/ChangeLog:

* constexpr.cc (cxx_eval_logical_expression): Remove unused
parameter.
(cxx_eval_constant_expression) <case TRUTH_ANDIF_EXPR>,
<case TRUTH_OR_EXPR>: Adjust calls to cxx_eval_logical_expression.

gcc/cp/constexpr.cc

index fa65290..47d5113 100644 (file)
@@ -4566,7 +4566,7 @@ cxx_eval_bit_cast (const constexpr_ctx *ctx, tree t, bool *non_constant_p,
 static tree
 cxx_eval_logical_expression (const constexpr_ctx *ctx, tree t,
                              tree bailout_value, tree continue_value,
-                            bool, bool *non_constant_p, bool *overflow_p)
+                            bool *non_constant_p, bool *overflow_p)
 {
   tree r;
   tree lhs = cxx_eval_constant_expression (ctx, TREE_OPERAND (t, 0),
@@ -7105,7 +7105,6 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
     case TRUTH_ANDIF_EXPR:
       r = cxx_eval_logical_expression (ctx, t, boolean_false_node,
                                       boolean_true_node,
-                                      lval,
                                       non_constant_p, overflow_p);
       break;
 
@@ -7113,7 +7112,6 @@ cxx_eval_constant_expression (const constexpr_ctx *ctx, tree t,
     case TRUTH_ORIF_EXPR:
       r = cxx_eval_logical_expression (ctx, t, boolean_true_node,
                                       boolean_false_node,
-                                      lval,
                                       non_constant_p, overflow_p);
       break;