diff --git a/glm/core/func_integer.inl b/glm/core/func_integer.inl index cbbad8f3..185f082d 100644 --- a/glm/core/func_integer.inl +++ b/glm/core/func_integer.inl @@ -522,7 +522,7 @@ namespace glm } // findMSB -#if(GLM_COMPILER & GLM_COMPILER_VC) +#if((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_VC)) template GLM_FUNC_QUALIFIER int findMSB @@ -535,7 +535,7 @@ namespace glm return int(Result); } -#elif((GLM_COMPILER & GLM_COMPILER_GCC) && __has_builtin(__builtin_clz)) +#elif((GLM_ARCH != GLM_ARCH_PURE) && (GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC40)) template GLM_FUNC_QUALIFIER int findMSB @@ -543,7 +543,7 @@ namespace glm genIUType const & Value ) { - return __builtin_clz(x); + return __builtin_clz(Value); } #else diff --git a/test/gtx/gtx_integer.cpp b/test/gtx/gtx_integer.cpp index a3429387..1a77db3f 100644 --- a/test/gtx/gtx_integer.cpp +++ b/test/gtx/gtx_integer.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include int test_floor_log2() {