aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/pt.c
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2003-11-11 17:27:32 -0500
committerJason Merrill <jason@gcc.gnu.org>2003-11-11 17:27:32 -0500
commit86098eb892eb05e5da0c9eba207a75024c0fb91b (patch)
tree8082fe968555564efdd07e3add06e1110ab8b493 /gcc/cp/pt.c
parent292d9f2bcd1b1f21ae717064c7c9823b3a9c83cc (diff)
downloadgcc-86098eb892eb05e5da0c9eba207a75024c0fb91b.zip
gcc-86098eb892eb05e5da0c9eba207a75024c0fb91b.tar.gz
gcc-86098eb892eb05e5da0c9eba207a75024c0fb91b.tar.bz2
cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro.
* cp-tree.h (DECL_NAMESPACE_ASSOCIATIONS): New macro. * name-lookup.c (parse_using_directive): New fn. (is_associated_namespace): New fn. (arg_assoc_namespace): Also check associated namespaces. * name-lookup.h: Declare new fns. * pt.c (maybe_process_partial_specialization): Allow specialization in associated namespace. * parser.c (cp_parser_using_directive): Accept attributes. Use parse_using_directive. From-SVN: r73468
Diffstat (limited to 'gcc/cp/pt.c')
-rw-r--r--gcc/cp/pt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/pt.c b/gcc/cp/pt.c
index e464af3..cd93423 100644
--- a/gcc/cp/pt.c
+++ b/gcc/cp/pt.c
@@ -731,8 +731,10 @@ maybe_process_partial_specialization (tree type)
if (CLASSTYPE_IMPLICIT_INSTANTIATION (type)
&& !COMPLETE_TYPE_P (type))
{
- if (current_namespace
- != decl_namespace_context (CLASSTYPE_TI_TEMPLATE (type)))
+ tree tpl_ns = decl_namespace_context (CLASSTYPE_TI_TEMPLATE (type));
+ if (is_associated_namespace (current_namespace, tpl_ns))
+ /* Same or super-using namespace. */;
+ else
{
pedwarn ("specializing `%#T' in different namespace", type);
cp_pedwarn_at (" from definition of `%#D'",