diff options
author | Martin v. Löwis <loewis@informatik.hu-berlin.de> | 1998-10-18 09:21:17 +0000 |
---|---|---|
committer | Martin v. Löwis <loewis@gcc.gnu.org> | 1998-10-18 09:21:17 +0000 |
commit | 39ee4d93e673f9f1ab52fcc357e8c5bd8a873090 (patch) | |
tree | f8d4ad37c44b123385f181d7f418b83a7c2d0a66 | |
parent | 820fcad8d10d88e7af355e9412335351c188cd3d (diff) | |
download | gcc-39ee4d93e673f9f1ab52fcc357e8c5bd8a873090.zip gcc-39ee4d93e673f9f1ab52fcc357e8c5bd8a873090.tar.gz gcc-39ee4d93e673f9f1ab52fcc357e8c5bd8a873090.tar.bz2 |
decl2.c (validate_nonmember_using_decl): Fix using-directives of std if std is ignored.
* decl2.c (validate_nonmember_using_decl): Fix using-directives of
std if std is ignored.
From-SVN: r23162
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl2.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 5ccf3c1..7b7740b 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +1998-10-18 Martin von Löwis <loewis@informatik.hu-berlin.de> + + * decl2.c (validate_nonmember_using_decl): Fix using-directives of + std if std is ignored. + 1998-10-18 Jason Merrill <jason@yorick.cygnus.com> * decl.c (grokvardecl): Fix thinko. diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c index b7dd732..1a85dcb 100644 --- a/gcc/cp/decl2.c +++ b/gcc/cp/decl2.c @@ -4664,8 +4664,11 @@ validate_nonmember_using_decl (decl, scope, name) { if (TREE_CODE (decl) == SCOPE_REF && TREE_OPERAND (decl, 0) == std_node) - return NULL_TREE; - if (TREE_CODE (decl) == SCOPE_REF) + { + *scope = global_namespace; + *name = TREE_OPERAND (decl, 1); + } + else if (TREE_CODE (decl) == SCOPE_REF) { *scope = TREE_OPERAND (decl, 0); *name = TREE_OPERAND (decl, 1); |