This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: g++ and 'public virtual'
- To: tw4 at irz301 dot inf dot tu-dresden dot de (Thomas Weise), egcs-bugs at cygnus dot com
- Subject: Re: g++ and 'public virtual'
- From: Jason Merrill <jason at cygnus dot com>
- Date: 02 Nov 1997 14:33:58 -0800
- References: <Pine.ULT.3.95.970917214818.11050A-100000.cygnus.egcs.bugs@irz301.inf.tu-dresden.de>
>>>>> Thomas Weise <tw4@irz301.inf.tu-dresden.de> writes:
> # > g++ oops.cc
> oops.cc: In method `void oops::__duplicate()':
> oops.cc:3: `void foo::__duplicate()' is protected
> oops.cc:17: within this context
This happens because the binfo node for oops::foo is the same as the node
for bar::foo, get_base_distance messes with the inheritance chain on
the binfos, and the compiler asks for the path from oops to foo, then from
bar to foo, then uses the first path which has been bashed.
Jason