This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [C++] namespace alias bug


[This is a duplicate post, since the original one was rejected]

> This should compile. It doesn't....

Thanks for your bug report. Here is a patch.

Regards,
Martin

// Build don't link:
namespace Foo
{
    enum FooEnum { Hi, Hello, HowAreYou };
}

namespace Foobar
{
    using namespace Foo;
}

namespace FB = Foobar;

void foobar(FB::FooEnum a_foo); 

2000-05-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>

	* decl2.c (qualified_lookup_using_namespace): Look through
	namespace aliases.

Index: decl2.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/cp/decl2.c,v
retrieving revision 1.349
diff -u -r1.349 decl2.c
--- decl2.c	2000/05/17 18:46:32	1.349
+++ decl2.c	2000/05/19 08:27:02
@@ -4402,6 +4402,8 @@
   /* ... and a list of namespace yet to see. */
   tree todo = NULL_TREE;
   tree usings;
+  /* Look through namespace aliases.  */
+  scope = ORIGINAL_NAMESPACE (scope);
   while (scope && (result != error_mark_node))
     {
       seen = tree_cons (scope, NULL_TREE, seen);



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]