https://gcc.gnu.org/g:4e9ff50d49e07bf9345c925ac69f1c0657f0be9c
commit r17-6186-g4e9ff50d49e07bf9345c925ac69f1c0657f0be9c Author: Shiva S <[email protected]> Date: Thu Nov 12 10:40:14 2026 -0700 [PATCH] mem-stats: Remove unused register_overhead overload The private mem_alloc_description::register_overhead overload is never used, and it calls register_descriptor with five arguments, which no overload accepts. Compilers that check template member definitions eagerly reject it. gcc/ChangeLog: * mem-stats.h (mem_alloc_description::register_overhead): Remove the unused private overload. Signed-off-by: Shiva <[email protected]> Diff: --- gcc/mem-stats.h | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/gcc/mem-stats.h b/gcc/mem-stats.h index dd83c9198773..004972a46543 100644 --- a/gcc/mem-stats.h +++ b/gcc/mem-stats.h @@ -382,11 +382,6 @@ public: reverse_object_map_t *m_reverse_object_map; private: - /* Register overhead of SIZE bytes of ORIGIN type. PTR pointer is allocated - in NAME source file, at LINE in source code, in FUNCTION. */ - T *register_overhead (size_t size, mem_alloc_origin origin, const char *name, - int line, const char *function, const void *ptr); - /* Allocation location coupled to the description. */ mem_location m_location; @@ -497,24 +492,6 @@ mem_alloc_description<T>::register_object_overhead (T *usage, size_t size, m_reverse_object_map->put (ptr, std::pair<T *, size_t> (usage, size)); } -/* Register overhead of SIZE bytes of ORIGIN type. PTR pointer is allocated - in NAME source file, at LINE in source code, in FUNCTION. */ - -template <class T> -inline T* -mem_alloc_description<T>::register_overhead (size_t size, - mem_alloc_origin origin, - const char *filename, - int line, - const char *function, - const void *ptr) -{ - T *usage = register_descriptor (ptr, origin, filename, line, function); - usage->register_overhead (size); - - return usage; -} - /* Release PTR pointer of SIZE bytes. */ template <class T>
