3 ms·
Most of the troubles related to -fstrict-aliasing involve -fstrict-aliasing.
by kayamon 8y ago
Most of the troubles related to -fstrict-aliasing involve -fstrict-aliasing.
- burfog 8y agoIf the processor supports unaligned reads, sure, you could say that, though it still technically violates the C standard. Otherwise, no. A typical issue would have code like this: foo = * (bar * )baz; // baz is a char pointer into a binary blob, and bar is a type that needs alignment If the data were all properly aligned, then most likely there would be no desire to write such code. The correct types would be used. Aside from gcc abusively optimizing, the above works fine on x86, PowerPC, and modern ARM. It does not work on older ARM. That sort of code is everywhere.