Emacs currently uses the Gnulib headers count-trailing-zeros.h and count-one-bits.h to do some low-level bit operations efficiently. C23 has standardized this in a new header and I've recently added support for a Gnulib substitute, taking implementation ideas from count-trailing-zeros.h, count-one-bits.h and elsewhere. So I'm planning to switch Emacs to the C23 standard way of doing things, using the Gnulib substitute on non-C23 platforms. The first attached patch does this. I plan to test this somewhat more before installing, but thought I'd give people a heads-up. The second attached patch is a minor cleanup to the 32-bit Android code, a cleanup made possible by the first attached patch. This cleanup patch is optional of course. By the way, I'm surprised to see the code in sfmt.c implementing 64-bit arithmetic from pairs of 32-bit words, as I thought even ancient 32-bit Android has 64-bit 'unsigned long long', but that's a matter for the Android experts I suppose.