This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/19403] [4.0 Regression] name lookup is broken with friends
- From: "Woebbeking at web dot de" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jan 2005 10:07:14 -0000
- Subject: [Bug c++/19403] [4.0 Regression] name lookup is broken with friends
- References: <20050112180427.19403.Woebbeking@web.de>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From Woebbeking at web dot de 2005-01-13 10:07 -------
Subject: Re: [4.0 Regression] name lookup is broken with friends
On Wednesday 12 January 2005 20:37, gdr at integrable-solutions dot net wrote:
>
> Excuse me?
>
> The behaviour mandated by the C++ standard is that if there is no
> declaration for type A in the innermost enclosing namespace then an
> implicit one is added -- because A is used unqualified. In
> particular, the global A should not be found. Thus the code is
> ill-formed.
So B's ctor uses the global A without the friend declaration and with the
friend declaration the local injected A? Sometimes the holy standard confuses
me a bit.
André
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19403