GNOME Bugzilla – Bug 637002
type-punned pointer warnings
Last modified: 2012-04-17 11:27:04 UTC
Created attachment 176221 [details] build log QA: other │ │QA Notice: Package has poor programmi fine but exhibit random runtime failures. │ │matcher.c:170:2: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │matcher.c:191:2: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │matcher.c:200:2: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │matcher.c:202:2: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules ng practices which may compile vteaccess.c:881:11: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │vtebg.c:275:5: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │vtebg.c:335:8: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │vtetc.c:516:3: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │vtetc.c:527:3: warning: dereferencing type-punned pointer will break strict- aliasing rules │ │vtetc.c:535:3: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │vtetc.c:537:3: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │matcher.c:170:2: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │matcher.c:191:2: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules matcher.c:200:2: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │matcher.c:202:2: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │vtetc.c:516:3: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │vtetc.c:527:3: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │vtetc.c:535:3: warning: dereferencing type-punned pointer will break strict-aliasing rules │ │vtetc.c:537:3: warning: dereferencing type-punned pointer will break strict- │ │aliasing rules │ │Please do not file a Gentoo bug and instead report the above QA │ │issues directly to the upstream developers of this software. │ │Homepage: http://www.gnome.org/ │ │ From the list of bugs unconfirmed or not for this program is their any real upstream here? At the least make this compile with -fno-strict-aliasing http://gcc.gnu.org/ml/gcc-help/2006-08/msg00240.html Dereferencing pointer type punned will break strict-aliasing rules A quote: << The most common warning you will see is probably "dereferencing type- punned pointer will break strict-aliasing rules". The place where it warns is in general not wrong -- what gcc tries to tell you is that you will break the aliasing rules when you dereference the pointer later (unless you cast it back to its original type first). This warning should be interpreted as saying that your interfaces are badly designed, and the correct way to avoid the warning is to redesign them in a way where you do not need to cast between conflicting types. (Even if you often can make this warning go away by changing void** to void*...) >> Please read the actual standard too. The rules about pointer type conversions are at 6.3.2.3. The appropriate paragraphs are paragraphs 1 and 7. http://www.open-std.org/JTC1/SC22/WG14/www/docs/n1124.pdf.
Created attachment 176244 [details] build log
Not sure we care about these, but if you had a (clean!) patch, we'd probably accept it.
The warnings all come from g_static_mutex_get_mutex() deep in glibconfig.h. And so deep that it's impossible to "fix" it. It's working around pthreads issues.
*** Bug 663282 has been marked as a duplicate of this bug. ***
*** Bug 674239 has been marked as a duplicate of this bug. ***