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]

Re: [bug] Inheritance and friend access control broken


Gabriel Dos Reis writes:

> protected member field access control seems to be broken in EGCS-980205.

I don't think your example is correct.  Friendship is not transitive;
just because f() is friend of D, it doesn't mean it has any
priviledged access to B.  However, since B::j is a member of D
(inherited from B), f() can access it as such.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil


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