Re: [gtkmm] ANNOUNCE: gtkmm 2.2.8



On Wed, 1 Oct 2003, Chris Vine wrote:
> On Wednesday 01 October 2003 8:00 am, Murray Cumming wrote:
> > On Wed, 2003-10-01 at 00:57, B. Bell wrote:
> > > On Tue, 30 Sep 2003, Chris Vine wrote:
> > > > On Monday 29 September 2003 6:05 pm, Murray Cumming wrote:
> > > > > 2.2.8:
> > > > >
> > > > > * Fixed "inacccessible base" build errors with gcc 3.3.2. (Bradley
> > > > > Bell)
> > > >
> > > > gcc-3.3.2 doesn't exist.  Is it a good idea to patch gtkmm to deal with
> > > > bugs in gcc snapshots, particularly as I think we have substituted
> > > > reinterpret_casts for valid uses of static_cast?
> > >
> > > Can you explain why you think a static_cast should be valid here?
> > > It seems to me that this behavior is also present in gcc 3.3.1 [see bug
> > > 117494], but was reverted for a short while, presumably because the error
> > > message produced was unhelpful.
> >
> > Firstly, sorry, I didn't realise that this was not a released gcc
> > version. There have been so many gcc-related bugs with so many versions
> > of gcc recently that I guess I got confused.
> >
> > But this one made sense - it was trying to cast A to B when B inherited
> > privately from A. I don't know for sure, but I can imagine why that
> > should not work.
>
> I have always understood that you can cast to a private base with static_cast.
> (With public inheritance it is a conversion which doesn't require an explicit
> cast).  Reinterpret_cast is intended for cases where there is no type
> relationship at all.  But I will check and see.

That made sense to me at first, too.  But the error message (x is an
inaccessible base of y) seems to be tailor-made for this situation.

-brad



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]