[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Remove defined but not used functions pointed out by GCC6.



Hello,

Ben Woodard <woodard@redhat.com> a Ãcrit:

> I donât know if these are the kinds of functions that I would get rid
> of. They donât look like much but even though they arenât being used
> now, they are the kinds of data access and type conversion functions
> that C++ is known for.

I agree with you that these are small and simple getter/conversion
functions.

The special thing, though, is that they are explicit specializations of
a template function, for the decl_base_sptr type.

What is used in the code today is the specializations of these functions
the the var_decl_sptr type.  Note that var_decl_sptr can be seen as
deriving from decl_base_sptr.  In other words, we use a more specialized
version of these template functions.

And it appears that the more general specialization is not used.  So we
might as well just get rid of it, because we already have a more precise
tool for the task.  If we need it later, it's simple enough to be added
again.  But I suspect that we'll then add even more specialized versions
of it.

Thank you for this comment.  It's cool to have discussions like this :-)

Cheers,

-- 
		Dodji