This is the mail archive of the gcc@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]

legal C++ ?


The following program compiles with the latest g++ but not with a couple
of other C++ compilers I tried.  It seems like g++ should not be accepting
this, is this a bug?  Should I submit a bug report against g++?

class A {
public:
     void l();
     friend class C;
};
class B : protected A {
};
class C {
     void v(B * g) { g->l(); }
};

Steve Ellcey
sje@cup.hp.com


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