This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++] namespace alias bug
- To: gcc-patches at gcc dot gnu dot org
- Subject: Re: [C++] namespace alias bug
- From: "Martin v. Loewis" <martin at loewis dot home dot cs dot tu-berlin dot de>
- Date: Fri, 19 May 2000 11:06:12 +0200
[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);