GNOME Bugzilla – Bug 642341
Gentoo QA warnings: x11-libs/pango-1.28.3: pango-ot-ruleset.c: warning: dereferencing type-punned pointer will break strict-aliasing rules
Last modified: 2012-08-18 17:35:42 UTC
When installing the x11-libs/pango-1.28.3 package on my Gentoo system, I received the following notification: * QA Notice: Package has poor programming practices which may compile * fine but exhibit random runtime failures. * pango-ot-ruleset.c:547: warning: dereferencing type-punned pointer will break strict-aliasing rules * pango-ot-ruleset.c:595: warning: dereferencing type-punned pointer will break strict-aliasing rules * pango-ot-ruleset.c:595: 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.pango.org/ * ERROR: x11-libs/pango-1.28.3 failed: * install aborted due to poor programming practices shown above Looking at the build output, here are the warnings in context: CC pangoft2-render.lo CC pango-ot-buffer.lo CC pango-ot-info.lo pango-ot-info.c: In function '_pango_ot_info_position': pango-ot-info.c:571: warning: unused variable 'is_hinted' CC pango-ot-ruleset.lo pango-ot-ruleset.c: In function 'pango_ot_ruleset_description_hash': pango-ot-ruleset.c:547: warning: dereferencing type-punned pointer will break strict-aliasing rules pango-ot-ruleset.c: In function 'pango_ot_ruleset_description_equal': pango-ot-ruleset.c:595: warning: dereferencing type-punned pointer will break strict-aliasing rules pango-ot-ruleset.c:595: warning: dereferencing type-punned pointer will break strict-aliasing rules CC pango-ot-tag.lo CCLD libpangoft2-1.0.la CC pangoxft-font.lo CC pangoxft-fontmap.lo
Those are harmless. They are warnings afterall...
Still a problem in v1.28.4.
Closing as per Comment 1.
So QA problems are not deemed to be problems? 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
I've studied all the relevant docs many many times. I know what I'm talking about. These are side-effects of how gobject is designed to use the C language. IT IS NOT A PROBLEM in these cases. Whatever.
Compiling pango-1.30.0: QA Notice: Package triggers severe warnings which indicate that it may exhibit random runtime failures. pango-ot-ruleset.c:516:7: warning: dereferencing type-punned pointer will break strict-aliasing rules pango-ot-ruleset.c:564:7: warning: dereferencing type-punned pointer will break strict-aliasing rules pango-ot-ruleset.c:564:7: warning: dereferencing type-punned pointer will break strict-aliasing rules