decl.c (lookup_namespace_name): If the name is a namespace, return it immediately.

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
This commit is contained in:
Martin v. Löwis 1998-09-25 11:07:29 +00:00 committed by Martin v. Löwis
parent 2abbc1bd67
commit 1231fb960d
2 changed files with 10 additions and 0 deletions

View 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.

View 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);