public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* c++: Remove unused fn
@ 2021-01-19 14:51 Nathan Sidwell
  0 siblings, 0 replies; only message in thread
From: Nathan Sidwell @ 2021-01-19 14:51 UTC (permalink / raw)
  To: GCC Patches, Martin Liška

[-- Attachment #1: Type: text/plain, Size: 232 bytes --]

Martin pointed out this is found with some warning modes.

I had two overloads of a function, but only one	was needed.  Let's keep
the constant one.

	gcc/cp/
         * modules.cc (identifier): Merge overloads.

-- 
Nathan Sidwell

[-- Attachment #2: unused.diff --]
[-- Type: text/x-patch, Size: 708 bytes --]

diff --git i/gcc/cp/module.cc w/gcc/cp/module.cc
index 1fd0bcfe3eb..e9a5eaeb4b4 100644
--- i/gcc/cp/module.cc
+++ w/gcc/cp/module.cc
@@ -276,13 +276,10 @@ static inline cpp_hashnode *cpp_node (tree id)
 {
   return CPP_HASHNODE (GCC_IDENT_TO_HT_IDENT (id));
 }
-static inline tree identifier (cpp_hashnode *node)
-{
-  return HT_IDENT_TO_GCC_IDENT (HT_NODE (node));
-}
-static inline const_tree identifier (const cpp_hashnode *node)
+
+static inline tree identifier (const cpp_hashnode *node)
 {
-  return identifier (const_cast <cpp_hashnode *> (node));
+  return HT_IDENT_TO_GCC_IDENT (HT_NODE (const_cast<cpp_hashnode *> (node)));
 }
 
 /* During duplicate detection we need to tell some comparators that

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

only message in thread, other threads:[~2021-01-19 14:51 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19 14:51 c++: Remove unused fn Nathan Sidwell

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