This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/13935] [3.4/3.5 Regression] Template friend lookup bug
- From: "giovannibajo at libero dot it" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 2 Feb 2004 02:35:41 -0000
- Subject: [Bug c++/13935] [3.4/3.5 Regression] Template friend lookup bug
- References: <20040130165003.13935.giovannibajo@libero.it>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From giovannibajo at libero dot it 2004-02-02 02:35 -------
Subject: Re: [3.4/3.5 Regression] Template friend lookup bug
gdr at integrable-solutions dot net wrote:
> Note that the paragraph speaks of "name *used*" not name declared, so
> your qoute about named declared is irrelevant. What matters is the
> *use* of the names. Here, in the friend-declaration, the name is used
> to grant friendship -- it is not declared; it is *used*. If
> re-evaluation after the completed class-scope gives something
> different
> then bad things can happen.
So is this ill-formed:
-----------------------------
class N;
struct S
{
void f(N* );
class N;
};
-----------------------------
or, given the following bullet, "If reordering member declarations in a class
yields an alternate valid program under (1) and (2), the program is illformed,
no diagnostic is required.", is this ill-formed:
-----------------------------
class N;
struct S
{
class N;
void f(N* );
};
-----------------------------
?
Giovanni Bajo
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13935