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
This commit is contained in:
Martin v. Löwis 1998-10-18 09:21:17 +00:00 committed by Martin v. Löwis
parent 820fcad8d1
commit 39ee4d93e6
2 changed files with 10 additions and 2 deletions

View File

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

View File

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