Description of problem: When compiling JD 2.2.0 released (which depends on glibmm24 and gtkmm24) with glibmm 2.19.1/2.19.2, there are some warnings from /usr/include/glibmm-2.4/glibmm/refptr.h, ref: http://koji.fedoraproject.org/koji/buildinfo?buildID=81973 ------------------------------------------------------------------ make[3]: Entering directory `/builddir/build/BUILD/jd-2.2.0-rc090208/src' g++ -DHAVE_CONFIG_H -I. -I.. -I/usr/include/gtkmm-2.4 -I/usr/lib/gtkmm-2.4/include -I/usr/include/glibmm-2.4 -I/usr/lib/glibmm-2.4/include -I/usr/include/giomm-2.4 -I/usr/lib/giomm-2.4/include -I/usr/include/gdkmm-2.4 -I/usr/lib/gdkmm-2.4/include -I/usr/include/pangomm-1.4 -I/usr/include/atkmm-1.6 -I/usr/include/gtk-2.0 -I/usr/include/sigc++-2.0 -I/usr/lib/sigc++-2.0/include -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/lib/gtk-2.0/include -I/usr/include/cairomm-1.0 -I/usr/include/pango-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/atk-1.0 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables -ggdb -Wall -DGTKMMVER=2120 -DUSE_XSMP -MT winmain.o -MD -MP -MF .deps/winmain.Tpo -c -o winmain.o winmain.cpp /usr/include/glibmm-2.4/glibmm/refptr.h: In constructor 'WinMain::WinMain(bool)': /usr/include/glibmm-2.4/glibmm/refptr.h:172: warning: dereferencing pointer '<anonymous>' does break strict-aliasing rules /usr/include/glibmm-2.4/glibmm/refptr.h:285: warning: dereferencing pointer '<anonymous>' does break strict-aliasing rules /usr/lib/gcc/i386-redhat-linux/4.4.0/../../../../include/c++/4.4.0/bits/stl_list.h:219: note: initialized from here /usr/include/glibmm-2.4/glibmm/refptr.h: In constructor 'WinMain::WinMain(bool)': /usr/include/glibmm-2.4/glibmm/refptr.h:172: warning: dereferencing pointer '<anonymous>' does break strict-aliasing rules /usr/include/glibmm-2.4/glibmm/refptr.h:285: warning: dereferencing pointer '<anonymous>' does break strict-aliasing rules /usr/lib/gcc/i386-redhat-linux/4.4.0/../../../../include/c++/4.4.0/bits/stl_list.h:219: note: initialized from here -------------------------------------------------------------------- Would you investigate this? (JD uses parallel make so debug message output is somewhat not in the right order, however it seems that these warnings come when compiling src/winmain.cpp) JD upstream does not seem to have g++44. If JD size needs fixing and you can provide a patch for JD, I will report to JD upstream Version-Release number of selected component (if applicable): glibmm24 2.19.1/2.19.2 jd-2.2.0-1.fc11.i386 gcc-c++-4.4.0-0.17.i386 How reproducible: 100% Steps to Reproduce: 1. See above 2. 3.
No changes with glibmm 2.19.2. Filed upstream.
I don't know what the warning means, but I suspect it would be a problem with a regular pointer, not just the RefPtr smartpointer. Maybe someone could attach the source file - it might give us more clues.
Created attachment 332013 [details] src/winmain.h (In reply to comment #2) > Maybe someone could attach > the source file - it might give us more clues. Okay. This is src/winmain.h
Created attachment 332014 [details] src/winmain.cpp and this is src/winmain.cpp
Could you try commenting lines out to see what line is triggering it? Maybe it's this one: std::list< Glib::RefPtr< Gdk::Pixbuf > > list_icons;
The following test code triggers the warning. You need to compile with -O2 -Wall #include <gtkmm.h> void foo(void) { std::list< Glib::RefPtr< Gdk::Pixbuf > > list; list.push_back( Gdk::Pixbuf::create_from_inline(0, NULL) ); Gtk::Window::set_default_icon_list( list_icons );
I wonder if this is this g++ bug, maybe not yet in Fedora's g++ version: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38937
CCing to Jakub.
Created attachment 332344 [details] winmain.cpp with gcc -E Jakub, would you investigate how to fix this? Now with gcc-4.4.0-0.20.i586 the warning on /usr/include/glibmm-2.4/glibmm/refptr.h:172 disappeared, however warning on /usr/include/glibmm-2.4/glibmm/refptr.h:285 still appears as: http://koji.fedoraproject.org/koji/taskinfo?taskID=1135010 src/winmain.cpp with gcc -E is attached. ------------------------------------------------------------- $ LANG=C gcc -v Using built-in specs. Target: i586-redhat-linux Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --enable-plugin --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog=/builddir/build/BUILD/gcc-4.4.0-20090216/cloog-ppl/inst/usr --with-tune=generic --with-arch=i586 --build=i586-redhat-linux Thread model: posix gcc version 4.4.0 20090217 (Red Hat 4.4.0-0.20) (GCC) ----------------------------------------------------------------
With gcc-4.4.0-0.21 all warnings disappeared...
Thanks for checking. Now I don't have to try to understand it.
Closing, as these warnings no longer appear with the latest gcc.