From: Patrick Palka <ppalka@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: jason@redhat.com, Patrick Palka <ppalka@redhat.com>
Subject: [committed] c++: remove single-parameter version of mark_used
Date: Tue, 13 Sep 2022 10:21:18 -0400 [thread overview]
Message-ID: <20220913142118.3183120-1-ppalka@redhat.com> (raw)
Tested on x86_64-pc-linux-gnu, committed to trunk as obvious.
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 | 4 ++--
gcc/cp/decl2.cc | 8 +-------
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 1eb176d4a50..f19ecafc266 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -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);
diff --git a/gcc/cp/decl2.cc b/gcc/cp/decl2.cc
index 684a2d06dde..9f18466192f 100644
--- a/gcc/cp/decl2.cc
+++ b/gcc/cp/decl2.cc
@@ -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)
{
--
2.37.3.542.gdd3f6c4cae
reply other threads:[~2022-09-13 14:21 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=20220913142118.3183120-1-ppalka@redhat.com \
--to=ppalka@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
/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: link
Be 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).