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 for explicit instantiation vs. namespace association


This patch fixes a testsuite regression, and is now actually tested. Sorry about the thrashing.

Jason

2006-01-13  Jason Merrill  <jason@redhat.com>

	* pt.c (check_explicit_specialization): Use CP_DECL_CONTEXT even more.

Index: pt.c
===================================================================
*** pt.c	(revision 109692)
--- pt.c	(working copy)
*************** check_explicit_specialization (tree decl
*** 1901,1907 ****
  
  	      /* Find the namespace binding, using the declaration
  		 context.  */
! 	      fns = lookup_qualified_name (current_namespace, dname,
  					   false, true);
  	      if (!fns || !is_overloaded_fn (fns))
  		{
--- 1901,1907 ----
  
  	      /* Find the namespace binding, using the declaration
  		 context.  */
! 	      fns = lookup_qualified_name (CP_DECL_CONTEXT (decl), dname,
  					   false, true);
  	      if (!fns || !is_overloaded_fn (fns))
  		{
*************** check_explicit_specialization (tree decl
*** 1911,1917 ****
  	      else
  		{
  		  tree fn = OVL_CURRENT (fns);
! 		  if (!is_associated_namespace (current_namespace,
  						CP_DECL_CONTEXT (fn)))
  		    error ("%qD is not declared in %qD",
  			   decl, current_namespace);
--- 1911,1917 ----
  	      else
  		{
  		  tree fn = OVL_CURRENT (fns);
! 		  if (!is_associated_namespace (CP_DECL_CONTEXT (decl),
  						CP_DECL_CONTEXT (fn)))
  		    error ("%qD is not declared in %qD",
  			   decl, current_namespace);

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