diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 2ba44e80e20cffdaa33337fe5e25f21fa032967b..1eb176d4a5078d3b60f7bc089435662427f51f3c 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -8414,6 +8414,8 @@ extern bool require_rvalue_constant_expression (tree);
 extern bool require_potential_rvalue_constant_expression (tree);
 extern tree cxx_constant_value			(tree, tree = NULL_TREE,
 						 tsubst_flags_t = tf_error);
+inline tree cxx_constant_value (tree t, tsubst_flags_t complain)
+{ return cxx_constant_value (t, NULL_TREE, complain); }
 extern void cxx_constant_dtor			(tree, tree);
 extern tree cxx_constant_init			(tree, tree = NULL_TREE);
 extern tree maybe_constant_value		(tree, tree = NULL_TREE, bool = false);
diff --git a/gcc/cp/decl.cc b/gcc/cp/decl.cc
index 5404d7e084cc3f83dbdb1a1b13246d503a7cac70..006e9affcba7585d88972f696b9e1e4693642baa 100644
--- a/gcc/cp/decl.cc
+++ b/gcc/cp/decl.cc
@@ -18557,7 +18557,7 @@ build_explicit_specifier (tree expr, tsubst_flags_t complain)
 
   expr = build_converted_constant_bool_expr (expr, complain);
   expr = instantiate_non_dependent_expr (expr, complain);
-  expr = cxx_constant_value (expr, NULL_TREE, complain);
+  expr = cxx_constant_value (expr, complain);
   return expr;
 }
 
diff --git a/gcc/cp/except.cc b/gcc/cp/except.cc
index 4d7f0ce102da03603be88c5afd638fb346297022..048612de400b62a42b99d522537f8119447900bc 100644
--- a/gcc/cp/except.cc
+++ b/gcc/cp/except.cc
@@ -1257,7 +1257,7 @@ build_noexcept_spec (tree expr, tsubst_flags_t complain)
     {
       expr = build_converted_constant_bool_expr (expr, complain);
       expr = instantiate_non_dependent_expr (expr, complain);
-      expr = cxx_constant_value (expr, NULL_TREE, complain);
+      expr = cxx_constant_value (expr, complain);
     }
   if (TREE_CODE (expr) == INTEGER_CST)
     {
diff --git a/gcc/cp/pt.cc b/gcc/cp/pt.cc
index 074179288b6079c1bd3eae20b47e108cb1e5da6a..db4e808adec033ac53a233225e1d0de62b0964bf 100644
--- a/gcc/cp/pt.cc
+++ b/gcc/cp/pt.cc
@@ -3869,7 +3869,7 @@ expand_integer_pack (tree call, tree args, tsubst_flags_t complain,
   else
     {
       hi = instantiate_non_dependent_expr (hi, complain);
-      hi = cxx_constant_value (hi, NULL_TREE, complain);
+      hi = cxx_constant_value (hi, complain);
       int len = valid_constant_size_p (hi) ? tree_to_shwi (hi) : -1;
 
       /* Calculate the largest value of len that won't make the size of the vec
@@ -20121,7 +20121,7 @@ fold_targs_r (tree targs, tsubst_flags_t complain)
 	       && !glvalue_p (elt)
 	       && !TREE_CONSTANT (elt))
 	{
-	  elt = cxx_constant_value (elt, NULL_TREE, complain);
+	  elt = cxx_constant_value (elt, complain);
 	  if (elt == error_mark_node)
 	    return false;
 	}
diff --git a/gcc/cp/semantics.cc b/gcc/cp/semantics.cc
index 3edefb2fca2ab64f4ff1cb0ad7e1788b9f132b51..4f18997848487eb044989f51f91ff9f3d7d45b58 100644
--- a/gcc/cp/semantics.cc
+++ b/gcc/cp/semantics.cc
@@ -1042,7 +1042,7 @@ finish_if_stmt_cond (tree orig_cond, tree if_stmt)
     {
       maybe_warn_for_constant_evaluated (cond, /*constexpr_if=*/true);
       cond = instantiate_non_dependent_expr (cond);
-      cond = cxx_constant_value (cond, NULL_TREE);
+      cond = cxx_constant_value (cond);
     }
   else
     {