Re: [gtkmm] ANNOUNCE: gtkmm 2.2.8



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.

I strongly suspect that when gcc-3.2.2 is released, it will compile 
gtkmm-2.2.7, but let us see.  In the meantime I will try and check that the 
cast is permissible.

Chris.




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