decl2.c (validate_nonmember_using_decl): Fix using-directives of std if std is ignored.
authorMartin v. Löwis <loewis@informatik.hu-berlin.de>
Sun, 18 Oct 1998 09:21:17 +0000 (09:21 +0000)
committerMartin v. Löwis <loewis@gcc.gnu.org>
Sun, 18 Oct 1998 09:21:17 +0000 (09:21 +0000)
        * decl2.c (validate_nonmember_using_decl): Fix using-directives of
        std if std is ignored.

From-SVN: r23162

gcc/cp/ChangeLog
gcc/cp/decl2.c

index 5ccf3c1bf915ce4dceba08178701a6d6fe83d347..7b7740bba41938e05e5cc86cdf93ffddddfd5f39 100644 (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.
index b7dd7329c69c30486d3708964124cc1a58d893cc..1a85dcbe304dca4ae37ebeb2c11d6f1a7ddfbc0b 100644 (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);