[multiple changes]
authorAndrew Pinski <pinskia@physics.uc.edu>
Fri, 15 Oct 2004 14:30:21 +0000 (14:30 +0000)
committerAndrew Pinski <pinskia@gcc.gnu.org>
Fri, 15 Oct 2004 14:30:21 +0000 (07:30 -0700)
2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c++/16301
        * name-lookup.c (parse_using_directive): If we have a
        error_mark_node, do not set the decl namespace associations
        on it.

2004-10-14  Andrew Pinski  <pinskia@physics.uc.edu>

        PR c++/16301
        * g++.dg/lookup/strong-using-4.C: New test.

From-SVN: r89093

gcc/cp/ChangeLog
gcc/cp/name-lookup.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/lookup/strong-using-4.C [new file with mode: 0644]

index 8ae05c0e4ece00f1d1fc277ac92e7d9ab67ab38f..d970b5a5ea90d2c9ee541d356f7c53f75b5c9686 100644 (file)
@@ -1,3 +1,10 @@
+2004-10-13  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR c++/16301
+       * name-lookup.c (parse_using_directive): If we have a
+       error_mark_node, do not set the decl namespace associations
+       on it.
+
 2004-10-14  Mark Mitchell  <mark@codesourcery.com>
 
        PR c++/17976
index b7e29aa55d3c01194a1b4f2371a51fc602da2dbd..6634f8701466fc3e06309e3d7e330785dc8e6b6b 100644 (file)
@@ -3422,7 +3422,7 @@ parse_using_directive (tree namespace, tree attribs)
        {
          if (!toplevel_bindings_p ())
            error ("strong using only meaningful at namespace scope");
-         else
+         else if (namespace != error_mark_node)
            DECL_NAMESPACE_ASSOCIATIONS (namespace)
              = tree_cons (current_namespace, 0,
                           DECL_NAMESPACE_ASSOCIATIONS (namespace));
index 85801a82b72fcf84dbbe9dc7d6edb7c8d05c5aca..ebee9627548a6ac61c95f418a0919c2508aa7350 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-14  Andrew Pinski  <pinskia@physics.uc.edu>
+
+       PR c++/16301
+       * g++.dg/lookup/strong-using-4.C: New test.
+
 2004-10-14  Andrew Pinski  <pinskia@physics.uc.edu>
 
        PR middle-end/16567
diff --git a/gcc/testsuite/g++.dg/lookup/strong-using-4.C b/gcc/testsuite/g++.dg/lookup/strong-using-4.C
new file mode 100644 (file)
index 0000000..5ea1784
--- /dev/null
@@ -0,0 +1,8 @@
+// PR c++/16301
+
+// { dg-do compile }
+
+namespace NS2 
+{ 
+  using namespace NS1 __attribute__ ((strong));  // { dg-error "" }
+}