]> mj.ucw.cz Git - libucw.git/blobdiff - ucw/bitops.h
Compatibility with GCC < 4.0 is not needed any longer
[libucw.git] / ucw / bitops.h
index 0991de34f1dfe0756d3dbf49c0c804bbdc541229..21f40c47fc140a8c9e34a3b69665dc51baf29cce 100644 (file)
@@ -45,26 +45,9 @@ static inline uint bit_ffs(uint w)
 
 /* Count the number of bits set */
 
-#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-
 static inline uint bit_count(uint w)
 {
   return __builtin_popcount(w);
 }
 
-#else
-
-static inline uint bit_count(uint w)
-{
-  uint n = 0;
-  while (w)
-    {
-      w &= w - 1;
-      n++;
-    }
-  return n;
-}
-
-#endif
-
 #endif