3 ms·
The GNU __builtin_popcount takes an unsigned int. https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
by castratikron 7y ago
The GNU __builtin_popcount takes an unsigned int.
https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
- jayd16 7y agoRight. If he naively casts, it will cast to 2^(int bits size) and return 1 but that's wrong. Its not a complete solution.