Do not blindly use __builtin_clz() #ifdef __GNUC__, but only if gcc >= 3.4 for
it did not exist in previous releases. ok matthieu@
This commit is contained in:
parent
2fb4e077c6
commit
2673d4da6b
@ -37,7 +37,8 @@
|
||||
static force_inline int
|
||||
count_leading_zeros (uint32_t x)
|
||||
{
|
||||
#ifdef __GNUC__
|
||||
#if defined(__GNUC__) && \
|
||||
(__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
||||
return __builtin_clz (x);
|
||||
#else
|
||||
int n = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user