This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug c++/13935] [3.4/3.5 Regression] Template friend lookup bug


------- 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


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