5 ms·
UB doesn't exist in the processor (it does, but not here). If the compiler knows the pointer is aligned it can do the transformation.
by immibis 11mo ago
UB doesn't exist in the processor (it does, but not here). If the compiler knows the pointer is aligned it can do the transformation.
- zrm 11mo agoFor the compiler to know the pointer is aligned it would have to actually be aligned and there is no guarantee that it is.