I\'m trying to check some of my code for strict aliasing violations, but it looks like I\'ve missed something while trying to understand the strict aliasing rule.
Im
I expect that at O3 the compiler decides that because it knows variables of different types cannot alias, sp is never used. Therefore it removes sp from the program and no error is produced.
Either that or because l is a known value it is being converted to a constant for use by printf. It'll still have storage because its address is taken, but that storage is never written to as far as it knows.