Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes for building with clang-cl on Windows (#104)
* Avoid unused-variable warning on Windows When compiling with clang-cl: .../ir_emit.c(275,8): error: unused variable 'handle' [-Werror,-Wunused-variable] 275 | void *handle = NULL; | ^~~~~~ * Avoid redefining __ORDER_LITTLE_ENDIAN__ if already defined clang-cl defines this on Windows, resulting in an error. .../ir.h(32,10): error: '__ORDER_LITTLE_ENDIAN__' macro redefined [-Werror,-Wmacro-redefined] 32 | # define __ORDER_LITTLE_ENDIAN__ 1 | ^ <built-in>(39,9): note: previous definition is here 39 | #define __ORDER_LITTLE_ENDIAN__ 1234 * In ir_ntzl, always use the 64 bit version on Windows When compiling on Windows with clang-cl, __has_builtin(__builtin_ctzl) will evaluate to true, but a long on Windows is only 32 bits, resulting in an incorrect implementation. Move the _WIN64 block ahead of the general block so that it gets the 64 bit version. Fixes #101.
- Loading branch information