After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 122053 - fails to compile w/GCC 3.3.2
fails to compile w/GCC 3.3.2
Status: RESOLVED FIXED
Product: gtkmm
Classification: Bindings
Component: general
2.4
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2003-09-11 21:36 UTC by btb
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
workaround for inaccessible base bugs (2.68 KB, patch)
2003-09-14 07:35 UTC, btb
none Details | Review

Description btb 2003-09-11 21:36:29 UTC
Using the debian prerelease of gcc 3.3.2 (g++-3.3 1:3.3.2-0pre3) the
notebook example fails with:

In file included from /usr/include/gtkmm-2.0/gtkmm.h:85,
                 from examplewindow.h:22,
                 from examplewindow.cc:20:
/usr/include/gtkmm-2.0/gtkmm/notebook.h: In member function `const 
   Gtk::Notebook_Helpers::Page& 
   Gtk::Notebook_Helpers::PageIterator::operator*() const':
/usr/include/gtkmm-2.0/gtkmm/notebook.h:822: error: `
   Gtk::Notebook_Helpers::PageIterator' is an inaccessible base of `
   Gtk::Notebook_Helpers::Page'
/usr/include/gtkmm-2.0/gtkmm/notebook.h: In member function `const 
   Gtk::Notebook_Helpers::Page* 
   Gtk::Notebook_Helpers::PageIterator::operator->() const':
/usr/include/gtkmm-2.0/gtkmm/notebook.h:828: error: `
   Gtk::Notebook_Helpers::PageIterator' is an inaccessible base of `
   Gtk::Notebook_Helpers::Page'
In file included from /usr/include/gtkmm-2.0/gtkmm.h:85,
                 from examplewindow.h:22,
                 from main.cc:20:
/usr/include/gtkmm-2.0/gtkmm/notebook.h: In member function `const 
   Gtk::Notebook_Helpers::Page& 
   Gtk::Notebook_Helpers::PageIterator::operator*() const':
/usr/include/gtkmm-2.0/gtkmm/notebook.h:822: error: `
   Gtk::Notebook_Helpers::PageIterator' is an inaccessible base of `
   Gtk::Notebook_Helpers::Page'
/usr/include/gtkmm-2.0/gtkmm/notebook.h: In member function `const 
   Gtk::Notebook_Helpers::Page* 
   Gtk::Notebook_Helpers::PageIterator::operator->() const':
/usr/include/gtkmm-2.0/gtkmm/notebook.h:828: error: `
   Gtk::Notebook_Helpers::PageIterator' is an inaccessible base of `
   Gtk::Notebook_Helpers::Page'

Oddly enough, this error did _not_ occur with debian's previous version of
g++-3.3 (1:3.3.2-0pre2), which gave the very similar problem reported in
bug #121308
Comment 1 btb 2003-09-11 22:55:52 UTC
It may also be necessary to reopen of bug #117494 - it gives a
different error now, though...

treeiter.cc: In member function `const Gtk::TreeNodeChildren& 
   Gtk::TreeRow::children() const':
treeiter.cc:145: error: `Gtk::TreeIter' is an inaccessible base of `
   Gtk::TreeNodeChildren'
Comment 2 Murray Cumming 2003-09-13 18:15:57 UTC
I guess you can work around this with a C-style cast (with a TODO
comment next to it.). Could you try this, please?

We should probably change the inheritance from private to public, but
we can not do that without changing the API.
Comment 3 Murray Cumming 2003-09-14 02:09:03 UTC
By the way, you are reporting 2 compiler errors here, which doesn't
seem possible to me unless you are already using some workaround for
the treeview error. Please try to keep the bug reports focused.
Comment 4 btb 2003-09-14 06:55:36 UTC
sorry about that.  Using c-style cast or reinterpret_cast fixes it. 
Actually, there are 3 or 4 such places where this is necessary.  I'll
send a patch soon.
Comment 5 btb 2003-09-14 07:13:05 UTC
is there a difference between a c-style cast and reinterpret_cast? 
using c-style seemed like the natural thing to do when working with a
c type (i.e. Bug 121307), but here I used reinterpret_cast.  Maybe
it's just my aesthetics, I dunno.
Comment 6 btb 2003-09-14 07:35:21 UTC
Created attachment 19917 [details] [review]
workaround for inaccessible base bugs
Comment 7 Murray Cumming 2003-09-14 08:01:49 UTC
Yes, I think the reinterpret_cast<> is OK. Someone please commit this.
Comment 8 Bryan Forbes 2003-09-15 17:15:00 UTC
Patched and commited.
Comment 9 Murray Cumming 2003-09-19 09:12:03 UTC
Thanks, but this needs to be committed to gtkmm 2.4 as well.
Comment 10 Murray Cumming 2003-09-28 16:15:19 UTC
Committed to gtkmm 2.4.