No strict aliasing C / C++
For optimization “-O2” and above, compilers such as GCC enable strict aliasing. For a wide variety of existing projects, strict aliasing provides additional optimization. For some projects, such as MUMPS, memory leaks have been observed that are resolved by disabling strict aliasing using GCC flag “-fno-strict-aliasing”.
Strict aliasing links:
- tutorial
- discussion
- presentation
- Red Hat: “The joys and perils of C and C++ aliasing” Part 1 & Part 2
Clang also has option -f[no]strict-aliasing. libuv recommends -fno-strict-aliasing due to type punning.