Fix warnings

This commit is contained in:
Victor Zverovich
2018-02-10 06:28:33 -08:00
parent 0b635c9dc5
commit 6cb68f9496
2 changed files with 7 additions and 6 deletions

View File

@@ -160,7 +160,10 @@
namespace fmt {
namespace internal {
# pragma intrinsic(_BitScanReverse)
// Avoid Clang with Microsoft CodeGen's -Wunknown-pragmas warning.
# ifndef __clang__
# pragma intrinsic(_BitScanReverse)
# endif
inline uint32_t clz(uint32_t x) {
unsigned long r = 0;
_BitScanReverse(&r, x);
@@ -174,7 +177,7 @@ inline uint32_t clz(uint32_t x) {
}
# define FMT_BUILTIN_CLZ(n) fmt::internal::clz(n)
# ifdef _WIN64
# if defined(_WIN64) && !defined(__clang__)
# pragma intrinsic(_BitScanReverse64)
# endif