This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: C++ PATCH for explicit instantiation vs. namespace association
- From: Jason Merrill <jason at redhat dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Ranjit Mathew <rmathew at gmail dot com>, "gcc-patches >> GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 13 Jan 2006 20:12:57 -0500
- Subject: Re: C++ PATCH for explicit instantiation vs. namespace association
- References: <43C6B7A4.1060502@redhat.com> <43C72952.7020506@gmail.com> <43C7FB30.3060209@redhat.com>
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);