]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
c++: remove single-parameter version of mark_used
authorPatrick Palka <ppalka@redhat.com>
Tue, 13 Sep 2022 14:18:58 +0000 (10:18 -0400)
committerPatrick Palka <ppalka@redhat.com>
Tue, 13 Sep 2022 14:18:58 +0000 (10:18 -0400)
gcc/cp/ChangeLog:

* cp-tree.h (mark_used): Remove single-parameter overload.  Add
default argument to the two-parameter overload.
* decl2.cc (mark_used): Likewise.

gcc/cp/cp-tree.h
gcc/cp/decl2.cc

index 1eb176d4a5078d3b60f7bc089435662427f51f3c..f19ecafc266d3762a240636dd76a99928b6d6749 100644 (file)
@@ -6945,8 +6945,8 @@ extern bool decl_constant_var_p                   (tree);
 extern bool decl_maybe_constant_var_p          (tree);
 extern void no_linkage_error                   (tree);
 extern void check_default_args                 (tree);
-extern bool mark_used                          (tree);
-extern bool mark_used                          (tree, tsubst_flags_t);
+extern bool mark_used                          (tree,
+                                                tsubst_flags_t = tf_warning_or_error);
 extern bool mark_single_function               (tree, tsubst_flags_t);
 extern void finish_static_data_member_decl     (tree, tree, bool, tree, int);
 extern tree cp_build_parm_decl                 (tree, tree, tree);
index 684a2d06ddecb51fe942dbac9303c4e8c22ccb9e..9f18466192f54500883b2c801ae7ddec3e2392da 100644 (file)
@@ -5575,7 +5575,7 @@ mark_single_function (tree expr, tsubst_flags_t complain)
    wrong, true otherwise.  */
 
 bool
-mark_used (tree decl, tsubst_flags_t complain)
+mark_used (tree decl, tsubst_flags_t complain /* = tf_warning_or_error */)
 {
   /* If we're just testing conversions or resolving overloads, we
      don't want any permanent effects like forcing functions to be
@@ -5817,12 +5817,6 @@ mark_used (tree decl, tsubst_flags_t complain)
   return true;
 }
 
-bool
-mark_used (tree decl)
-{
-  return mark_used (decl, tf_warning_or_error);
-}
-
 tree
 vtv_start_verification_constructor_init_function (void)
 {