This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Namespace lookup: g++ 4.0.0 -> g++ 4.0.1 regression?
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Jhair Tocancipa Triana <jhair_tocancipa at gmx dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: 09 Jul 2005 12:07:16 +0200
- Subject: Re: Namespace lookup: g++ 4.0.0 -> g++ 4.0.1 regression?
- References: <871x688j5n.fsf@mandala.my-fqdn.de>
Jhair Tocancipa Triana <jhair_tocancipa@gmx.net> writes:
| Consider the following snippet:
|
| --8<---------------cut here---------------start------------->8---
| namespace foo
| {
| class A
| {
| friend class B;
|
| void bar (B);
| };
|
| class B {};
| }
| --8<---------------cut here---------------end--------------->8---
|
| This compiles fine with:
|
| g++ (GCC) 3.3.3
| g++ (GCC) 4.0.0
|
| But fails with g++ (GCC) 4.0.1:
|
| $ g++ -c namespace.cc
| namespace.cc:7: error: 'B' has not been declared
|
| Why? If this a bug, I am not sure it is the same bug as:
|
| http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19403
Yes. See second example from comment #6.
-- Gaby, in the friend mess again