[Bug 769183] Use -fno-strict-aliasing for everything

GStreamer (GNOME Bugzilla) bugzilla at gnome.org
Tue Jul 26 16:00:35 UTC 2016


https://bugzilla.gnome.org/show_bug.cgi?id=769183

--- Comment #1 from Martin Kelly <martin at surround.io> ---
The scary thing about the strict aliasing optimization is that it could break
with future compiler versions in some pretty subtle ways, even if it works fine
today. Therefore I think it's best either to carefully audit all the code for
this kind of issue (including the heavily used object macros), or just turn off
strict aliasing everywhere. Given the difficulty of the former, turning off
strict aliasing may be best, and it's what many other projects have done.

This is another very good article illustrating a subtle breakage:

http://blog.qt.io/blog/2011/06/10/type-punning-and-strict-aliasing/

Some people have very strong opinions about strict aliasing:

http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg01647.html

And here's a list of things that can go wrong with the optimization:

http://stackoverflow.com/questions/2958633/gcc-strict-aliasing-and-horror-stories

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list