It has everything to do with includes. Just think how implicit declarations are defined.
int count_bits(uint32_t x)
{
static const uint32_t mask[] = {
0x55555555,
0x33333333,
0x0f0f0f0f,
0x00ff00ff,
0x0000ffff
};
for (int i = 0, shift = 1; i < 5; ++i, shift *= 2)
x = (x & mask[i]) + ((x >> shift) & mask[i]);
return x;
}