This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C++ PATCH] Fix PR17154 regression (using declaration in partialspecialization)


Kriang Lerdsuwanakij wrote:
Hi

This patch fixes the regression PR17154.  In lookup_field_1,
we have a code to deal with USING_DECL's specially and return
them in case of using-declaration in class template.  Those names
cannot be found otherwise because they are member functions/member
data of dependent base.

However we forget to deal similar situation in class template
partial specialization.  The result is the name is ignored and become
invisible during parsing.  This is fixed by the attached patch.
Only the test !TREE_TYPE (field) is used there since it can deal
with names from dependent base directly.  For non-dependent USING_DECL,
the usual FUNCTION_DECL, etc. are returned.

Tested on i686-pc-linux-gnu. OK for mainline?
please change the test to
	if (TREE_TYPE(field))
	  continue;

ok with that change.

--
Nathan Sidwell    ::   http://www.codesourcery.com   ::     CodeSourcery LLC
nathan@codesourcery.com    ::     http://www.planetfall.pwp.blueyonder.co.uk


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]