Ignore constant-conversion warning (#5696)

This commit is contained in:
Ruslan Mustakov 2017-04-13 03:09:00 +07:00 • committed by Andreas Rumpf
commit 926563f0e6

View file

@ -26,14 +26,14 @@ __clang__
/*------------ declaring a custom attribute to support using LLVM's Address Sanitizer ------------ */ /*------------ declaring a custom attribute to support using LLVM's Address Sanitizer ------------ */
/* /*
This definition exists to provide support for using the LLVM ASAN (Address SANitizer) tooling with Nim. This This definition exists to provide support for using the LLVM ASAN (Address SANitizer) tooling with Nim. This
should only be used to mark implementations of the GC system that raise false flags with the ASAN tooling, or should only be used to mark implementations of the GC system that raise false flags with the ASAN tooling, or
for functions that are hot and need to be disabled for performance reasons. Based on the official ASAN for functions that are hot and need to be disabled for performance reasons. Based on the official ASAN
documentation, both the clang and gcc compilers are supported. In addition to that, a check is performed to documentation, both the clang and gcc compilers are supported. In addition to that, a check is performed to
verify that the necessary attribute is supported by the compiler. verify that the necessary attribute is supported by the compiler.
To flag a proc as ignored, append the following code pragma to the proc declaration: To flag a proc as ignored, append the following code pragma to the proc declaration:
{.codegenDecl: "CLANG_NO_SANITIZE_ADDRESS $# $#$#".} {.codegenDecl: "CLANG_NO_SANITIZE_ADDRESS $# $#$#".}
For further information, please refer to the official documentation: For further information, please refer to the official documentation:
https://github.com/google/sanitizers/wiki/AddressSanitizer https://github.com/google/sanitizers/wiki/AddressSanitizer
@ -64,6 +64,7 @@ __clang__
# pragma GCC diagnostic ignored "-Wmacro-redefined" # pragma GCC diagnostic ignored "-Wmacro-redefined"
# pragma GCC diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers" # pragma GCC diagnostic ignored "-Wincompatible-pointer-types-discards-qualifiers"
# pragma GCC diagnostic ignored "-Wpointer-bool-conversion" # pragma GCC diagnostic ignored "-Wpointer-bool-conversion"
# pragma GCC diagnostic ignored "-Wconstant-conversion"
#endif #endif
#if defined(_MSC_VER) #if defined(_MSC_VER)