Jan. 19, 2026
5:11 p.m.
On Mon Jan 19 22:44:47 2026 +0000, Alfred Agrell wrote:
If count==0, bits-count = 64, and v<<64 is UB. (Or 32 on 32bit builds, but still UB.) Consider instead `return (v >> (count % bits)) | (v << ((bits - count) % bits));`. https://godbolt.org/z/9nWP6zK8P (Or stdc_rotate_right, except that one doesn't exist until C23.) Same for the rotate left function below, and the actual encode/decode pointer functions. Oh well. Not sure if we really never ever do that, but indeed, best to avoid that, thanks.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/9926#note_127369