This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [bug] Inheritance and friend access control broken
> Gabriel Dos Reis writes:
class B {
protected:
int i;
static int j;
};
class D : public B {
friend void f();
};
void f()
{
B::j = 5;
D::j = 6;
}
> >>> protected member field access control seems to be broken in
>
> Alexandre> I don't think your example is correct. Friendship is not
>
> > The FDIS says :
>
> Seems like I was wrong. Sorry, I should have checked that before
> posting. Thanks for having done that.
So, the experts have checked appropriate standards and agree this is
a problem, right?
Any volunteers to create a testcase? It should be a matter of plonking
// Build don't link:
at the top, sticking a
// Bug: ..text that describes the problem..
and finding a home for it in
egcs/gcc/testsuite/g++.old-deja/*
--
Robert Lipe http://www.dgii.com/people/robertl robertl@dgii.com