type-punned pointer warnings
Submitted by olbrannon
Link to original bug (#637002)
Description
Created attachment 176221 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.
Attachment 176221, "build log":
x11-libs_3Avte-0.26.2_3A20101210-145548.log
Version: 0.26.x
Resolution: RESOLVED NOTABUG