decl.c (lookup_namespace_name): If the name is a namespace, return it immediately.
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>
Fri, 25 Sep 1998 11:07:29 +0000 (11:07 +0000)
committerMartin v. Löwis <loewis@gcc.gnu.org>
Fri, 25 Sep 1998 11:07:29 +0000 (11:07 +0000)
1998-09-24  Martin von L�wis  <loewis@informatik.hu-berlin.de>
* decl.c (lookup_namespace_name): If the name is a namespace,
return it immediately.

From-SVN: r22589

gcc/cp/ChangeLog
gcc/cp/decl.c

index a2cb2fc..fc6ad1e 100644 (file)
@@ -1,3 +1,8 @@
+1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
+
+       * decl.c (lookup_namespace_name): If the name is a namespace,
+       return it immediately.
+
 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * cp-tree.h (define_case_label): Remove unused parameter.
index 48d25d9..abd0808 100644 (file)
@@ -4752,6 +4752,11 @@ lookup_namespace_name (namespace, name)
   tree val;
 
   my_friendly_assert (TREE_CODE (namespace) == NAMESPACE_DECL, 370);
+
+  /* This happens for A::B<int> when B is a namespace. */
+  if (TREE_CODE (name) == NAMESPACE_DECL)
+    return name;
+
   my_friendly_assert (TREE_CODE (name) == IDENTIFIER_NODE, 373);
   
   val = binding_init (&_b);