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 121307 - gnomemm 1.2 compilation fails with GCC 3.3
gnomemm 1.2 compilation fails with GCC 3.3
Status: RESOLVED FIXED
Product: libgnomeuimm
Classification: Other
Component: general
git master
Other Linux
: Normal normal
: ---
Assigned To: gtkmm-forge
gtkmm-forge
Depends on:
Blocks:
 
 
Reported: 2003-09-02 22:44 UTC by btb
Modified: 2011-01-16 23:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
workaround for inaccessible base bug (1.24 KB, patch)
2003-09-14 07:53 UTC, btb
none Details | Review

Description btb 2003-09-02 22:44:15 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.
Comment 1 Murray Cumming 2003-09-03 07:12:18 UTC
*** Bug 121308 has been marked as a duplicate of this bug. ***
Comment 2 Murray Cumming 2003-09-13 22:56:23 UTC
I would commit a patch for this, to use the C-style cast.
Comment 3 btb 2003-09-14 07:53:36 UTC
Created attachment 19918 [details] [review]
workaround for inaccessible base bug
Comment 4 Murray Cumming 2003-09-14 08:04:01 UTC
Thanks. Someone, please commit this, with an explanatory comment in
the source.
Comment 5 Murray Cumming 2003-09-30 17:53:03 UTC
Commited. Thanks. Tell us if you need a new release soon.