This is the mail archive of the gcc-bugs@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: g++ and 'public virtual'


>>>>> 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


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