GNOME Bugzilla – Bug 121307
gnomemm 1.2 compilation fails with GCC 3.3
Last modified: 2011-01-16 23:41:35 UTC
Using debian's gcc (a prerelease of 3.3.2), compilation fails with this error: ../gnome--/app-helper.h: In member function `GnomeUIInfo* Gnome::UI::Array<T_Info>::gtkobj() const [with T_Info = Gnome::UI::SubTree] ': app.cc:110: instantiated from here ../gnome--/app-helper.h:264: error: `GnomeUIInfo' is an inaccessible base of ` Gnome::UI::Info' I can currently workaround this by using a c-style cast instead of static_cast: --- gnomemm-1.2.4.orig/src/gnome--/app-helper.h +++ gnomemm-1.2.4/src/gnome--/app-helper.h @@ -261,7 +261,8 @@ { return static_cast<T_Info&>(begin_[n]); } GnomeUIInfo* gtkobj() const - { return static_cast<GnomeUIInfo*>(data_); } + //{ return static_cast<GnomeUIInfo*>(data_); } + { return (GnomeUIInfo*)(data_); } vector<Info> make_return_vector(); //Used by get_uitree(). vector<SubTree> make_return_vector_subtrees(); //Used by Gnome::App.
*** Bug 121308 has been marked as a duplicate of this bug. ***
I would commit a patch for this, to use the C-style cast.
Created attachment 19918 [details] [review] workaround for inaccessible base bug
Thanks. Someone, please commit this, with an explanatory comment in the source.
Commited. Thanks. Tell us if you need a new release soon.