Hi Everyone, We got a user report of a compile failure using Apple's Clang. I don't know the exact Apple Clang version at the moment. Its on OS X 10.11, and its probably the one bundled with the latest Xcode.
Here's the error report (https://groups.google.com/forum/#!topic/cryptopp-users/BI8yGpr2XNo): misc.h:675:23: error: use of undeclared identifier '_tzcnt_u64' misc.h:790:22: error: use of undeclared identifier '_blsr_u64'; did you mean '__blsr_u32'? Here's the code in question from misc.h (from http://github.com/weidai11/cryptopp/blob/master/misc.h): #if defined(__GNUC__) && defined(__BMI__) return (unsigned int)_tzcnt_u64(v); #elif defined(__GNUC__) && (GCC_VERSION >= 30400) return (unsigned int)__builtin_ctzll(v); #elif ... .... #endif And from misc.h (from http://github.com/weidai11/cryptopp/blob/master/misc.h): #if defined(__GNUC__) && defined(__BMI__) template <> inline bool IsPowerOf2<word64>(const word64 &value) { return value > 0 && _blsr_u64(value) == 0; } #endif I believe both symbols are available in <immintrin.h> http://software.intel.com/sites/landingpage/IntrinsicsGuide/#=undefined&text=_blsr_u64&expand=421): #if defined(__GNUC__) && defined(__BMI__) #include <immintrin.h> #endif Given __BMI__ is defined, why are we catching the "undeclared identifier" error? Thanlk in advance/ _______________________________________________ cfe-users mailing list cfe-users@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users