[C++ PATCH] Fix PR17154 regression (using declaration in partial specialization)

Nathan Sidwell nathan@codesourcery.com
Wed Jan 5 15:27:00 GMT 2005


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



More information about the Gcc-patches mailing list