According to -fno-strict-aliasing in the online manual (https://gcc.gnu.org/onlinedocs/gcc-4.4.2/gcc/Optimize-Options.html): Allow the compiler to assume the strictest aliasing rules ... ... unless the types are almost the same. I think "almost the same" applies to sizes and alignments, and not qualifiers like const and volatile. Does GCC consider an 'int' and a 'volatile int' (or 'int*' and a 'volatile int*') almost the same?