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 121308 - libgnomeuimm 1.3 compilation fails with GCC 3.3
libgnomeuimm 1.3 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
: 121494 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-09-02 22:59 UTC by btb
Modified: 2011-01-16 23:41 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description btb 2003-09-02 22:59:04 UTC
Using debian's gcc (a prerelease of 3.3.2), compilation fails with this error:

../../libgnomeui/libgnomeuimm/app-helper.h: In member function `GnomeUIInfo* 
   Gnome::UI::Items::Array<T_Info>::gobj() const [with T_Info = 
   Gnome::UI::Items::SubTree]':
app.cc:107:   instantiated from here
../../libgnomeui/libgnomeuimm/app-helper.h:265: error: `GnomeUIInfo' is an 
   inaccessible base of `Gnome::UI::Items::Info'

I can currently workaround this by using a c-style cast instead of static_cast:

--- libgnomeuimm1.3-1.3.17.orig/libgnomeui/libgnomeuimm/app-helper.h
+++ libgnomeuimm1.3-1.3.17/libgnomeui/libgnomeuimm/app-helper.h
@@ -262,7 +262,8 @@
   
 
   GnomeUIInfo* gobj() const
-  { return static_cast<GnomeUIInfo*>(data_); }
+  //{ return static_cast<GnomeUIInfo*>(data_); }
+  { return (GnomeUIInfo*)(data_); }
   
 };
Comment 1 Murray Cumming 2003-09-03 07:12:22 UTC

*** This bug has been marked as a duplicate of 121307 ***
Comment 2 btb 2003-09-03 09:33:45 UTC
I don't think this is a duplicate of #121308 because it applies to
1.3, not 1.2.  The problem is the same, though.
Comment 3 Murray Cumming 2003-09-04 07:39:32 UTC
Oh, sorry. I guess it might be better to change
class Info : protected GnomeUIInfo
to
class Info : public GnomeUIInfo,
with a comment about the cast there.
I don't know whether this is a true compiler error though.

Let's do this quick if necessary, because I was about to releas 2.0.0.
Comment 4 btb 2003-09-04 18:12:52 UTC
I suspect a gcc bug, but I'm a little out of my league there.

Changing protected to public works for me, no c-style casting necessary.
Comment 5 btb 2003-09-05 07:06:28 UTC
*** Bug 121494 has been marked as a duplicate of this bug. ***
Comment 6 Murray Cumming 2003-09-05 07:39:26 UTC
*** Bug 121494 has been marked as a duplicate of this bug. ***
Comment 7 Murray Cumming 2003-09-05 09:45:39 UTC
Fixed in cvs. Please test the 2.0.0 test tarball at 
http://www.murrayc.com/temp/