Don't use __builtin_clz() on gcc2. (thanks, Axel!)
authorRyan C. Gordon <icculus@icculus.org>
Fri, 29 Mar 2013 21:16:30 -0400
changeset 7033 3b12bae22f9e
parent 7032 305feca4f152
child 7034 3a5a53435ebd
Don't use __builtin_clz() on gcc2. (thanks, Axel!) Fixes Bugzilla #1771.
include/SDL_bits.h
--- a/include/SDL_bits.h	Fri Mar 29 21:13:16 2013 -0400
+++ b/include/SDL_bits.h	Fri Mar 29 21:16:30 2013 -0400
@@ -52,7 +52,7 @@
 SDL_FORCE_INLINE Sint8
 SDL_MostSignificantBitIndex32(Uint32 x)
 {
-#if defined(__GNUC__)
+#if defined(__GNUC__) && __GNUC__ >= 4
     /* Count Leading Zeroes builtin in GCC.
      * http://gcc.gnu.org/onlinedocs/gcc-4.3.4/gcc/Other-Builtins.html
      */