2 ms·
It’s not potentially UB until you access the object through the wrong pointer type; pointer math isn’t type punning. In this case it should be accessed through
by brigade 4y ago
It’s not potentially UB until you access the object through the wrong pointer type; pointer math isn’t type punning.
In this case it should be accessed through one of the load intrinsics, which has its behavior defined in the same way memcpy doesn’t invoke UB.