diff options
author | Martin v. Löwis <loewis@informatik.hu-berlin.de> | 1998-09-25 11:07:29 +0000 |
---|---|---|
committer | Martin v. Löwis <loewis@gcc.gnu.org> | 1998-09-25 11:07:29 +0000 |
commit | 1231fb960d04d93cc39a612d2de7543ae3ea3b2f (patch) | |
tree | 99a4d3369697dbf37abd40ebc2b5ee46337ca9f7 /gcc | |
parent | 2abbc1bd6759aa446ac7b82bf0ee969219fcc7e3 (diff) | |
download | gcc-1231fb960d04d93cc39a612d2de7543ae3ea3b2f.zip gcc-1231fb960d04d93cc39a612d2de7543ae3ea3b2f.tar.gz gcc-1231fb960d04d93cc39a612d2de7543ae3ea3b2f.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index a2cb2fc..fc6ad1e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 48d25d9..abd0808 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -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); |