Re: [gtkmm] ANNOUNCE: gtkmm 2.2.8



On Wednesday 01 October 2003 8:15 pm, B. Bell wrote:
> 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.

I am checking.  Put it this way, parent to child conversion with private 
inheritance has worked with static_cast on every compiler I have used.  It is 
possible that a gcc snapshot has made gcc compliant with the standard after a 
considerable period of non-compliance, but other outcomes are more likely.  
(You may have me eating humble pie later).

Chris.




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