I've seen these warnings when building the latest sources
display/canvas-arena.cpp: In function `void sp_canvas_arena_class_init(SPCanvasArenaClass*)': display/canvas-arena.cpp:91: warning: invalid access to non-static data member `SPCanvasArenaClass::arena_event' of NULL object display/canvas-arena.cpp:91: warning: (perhaps the `offsetof' macro was used incorrectly)
display/sp-canvas.cpp: In function `void sp_canvas_item_class_init(SPCanvasItemClass*)': display/sp-canvas.cpp:110: warning: invalid access to non-static data member `SPCanvasItemClass::event' of NULL object display/sp-canvas.cpp:110: warning: (perhaps the `offsetof' macro was used incorrectly)
Someone familiar with the area these are in should take a look. I do think these should be corrected, just not sure of the "proper" fix.
bulia byak wrote:
I've seen these warnings when building the latest sources
They've been there for a very long time. I don't think anyone knows how to fix them quickly, so if you have spare time you might look into them.
It seems to be related to this:
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13275
Bob
On Mon, 2004-10-18 at 13:58, Jon A. Cruz wrote:
I've seen these warnings when building the latest sources
display/canvas-arena.cpp: In function `void sp_canvas_arena_class_init(SPCanvasArenaClass*)': display/canvas-arena.cpp:91: warning: invalid access to non-static data member `SPCanvasArenaClass::arena_event' of NULL object display/canvas-arena.cpp:91: warning: (perhaps the `offsetof' macro was used incorrectly)
display/sp-canvas.cpp: In function `void sp_canvas_item_class_init(SPCanvasItemClass*)': display/sp-canvas.cpp:110: warning: invalid access to non-static data member `SPCanvasItemClass::event' of NULL object display/sp-canvas.cpp:110: warning: (perhaps the `offsetof' macro was used incorrectly)
gcc 3.3 doesn't like these either.
-mental
I found a thread on the GCC list about this:
http://gcc.gnu.org/ml/gcc/2003-11/msg00279.html
It seems that the members of the GCC project themselves are still uncertain about offsets in C++, and that their use is quite likely unsafe. Maybe instead of fixing the warning, we should look at using a Gtkmm/Sigc++ design instead?
Bob
MenTaLguY wrote:
On Mon, 2004-10-18 at 13:58, Jon A. Cruz wrote:
I've seen these warnings when building the latest sources
display/canvas-arena.cpp: In function `void sp_canvas_arena_class_init(SPCanvasArenaClass*)': display/canvas-arena.cpp:91: warning: invalid access to non-static data member `SPCanvasArenaClass::arena_event' of NULL object display/canvas-arena.cpp:91: warning: (perhaps the `offsetof' macro was used incorrectly)
display/sp-canvas.cpp: In function `void sp_canvas_item_class_init(SPCanvasItemClass*)': display/sp-canvas.cpp:110: warning: invalid access to non-static data member `SPCanvasItemClass::event' of NULL object display/sp-canvas.cpp:110: warning: (perhaps the `offsetof' macro was used incorrectly)
gcc 3.3 doesn't like these either.
-mental
participants (4)
-
Bob Jamison
-
bulia byak
-
Jon A. Cruz
-
MenTaLguY