3 ms·
On RISC platforms *(uint32_t*)s will get you a SIGBUS if s is not aligned to a 4-byte boundary. Though that's another issue, not what OP was referring to.
by huhtenberg 10y ago
On RISC platforms
*(uint32_t*)s
will get you a SIGBUS if s is not aligned to a 4-byte boundary. Though that's another issue, not what OP was referring to.
- zeusk 10y agoARM has unaligned access since v6 (introduced in 2001); if you're on linux, unaligned access will be patched by the kernel (as was the case prior ARMv6 and even for MIPS afaik). Anyway, the point of his post was about possible gains from removing validation, not about being portable or production code.