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 642341 - Gentoo QA warnings: x11-libs/pango-1.28.3: pango-ot-ruleset.c: warning: dereferencing type-punned pointer will break strict-aliasing rules
Gentoo QA warnings: x11-libs/pango-1.28.3: pango-ot-ruleset.c: warning: deref...
Status: RESOLVED OBSOLETE
Product: pango
Classification: Platform
Component: general
1.28.x
Other Linux
: Normal minor
: ---
Assigned To: pango-maint
pango-maint
Depends on:
Blocks:
 
 
Reported: 2011-02-15 01:25 UTC by Dan Wallis
Modified: 2012-08-18 17:35 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dan Wallis 2011-02-15 01:25:51 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
Comment 1 Behdad Esfahbod 2011-02-15 19:18:50 UTC
Those are harmless.  They are warnings afterall...
Comment 2 Dan Wallis 2011-06-08 22:52:59 UTC
Still a problem in v1.28.4.
Comment 3 Behdad Esfahbod 2011-06-08 22:54:53 UTC
Closing as per Comment 1.
Comment 4 Dan Wallis 2011-06-08 23:36:11 UTC
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
Comment 5 Behdad Esfahbod 2011-06-09 04:22:07 UTC
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.
Comment 6 Ilya Gordeev 2012-04-17 09:25:32 UTC
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