Index: cp/name-lookup.c =================================================================== RCS file: /cvs/gcc/gcc/gcc/cp/name-lookup.c,v retrieving revision 1.86 diff -u -p -r1.86 name-lookup.c --- cp/name-lookup.c 5 Oct 2004 13:27:40 -0000 1.86 +++ cp/name-lookup.c 15 Oct 2004 00:22:21 -0000 @@ -3422,7 +3422,7 @@ parse_using_directive (tree namespace, t { 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: testsuite/g++.dg/lookup/strong-using-4.C =================================================================== RCS file: testsuite/g++.dg/lookup/strong-using-4.C diff -N testsuite/g++.dg/lookup/strong-using-4.C --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ testsuite/g++.dg/lookup/strong-using-4.C 15 Oct 2004 00:22:21 -0000 @@ -0,0 +1,8 @@ +// PR c++/16301 + +// { dg-do compile } + +namespace NS2 +{ + using namespace NS1 __attribute__ ((strong)); // { dg-error "" } +}