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
- To: Gabriel Dos Reis <Gabriel dot Dos-Reis at dptmaths dot ens-cachan dot fr>
- Subject: Re: [bug] Inheritance and friend access control broken
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 04 Mar 1998 01:32:27 -0300
- Cc: egcs at cygnus dot com
- References: <199803032141.WAA09332@piano.dptmaths.ens-cachan.fr>
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