diff options
author | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-11-10 21:35:59 -0800 |
---|---|---|
committer | Arseny Kapoulkine <arseny.kapoulkine@gmail.com> | 2017-11-10 21:35:59 -0800 |
commit | 492ebc22bc2a7bf6710d5e154dd6f37c120de4fd (patch) | |
tree | 0d7ab7df789dbd0581ffc464857f8c249732132f /tests | |
parent | ba9504325ed152ddc5b3fdc94e77df217e83f364 (diff) |
tests: Fix expansion-to-defined warning
This warning is new as of GCC 7 and highlights undefined behavior in the
preprocessor that ASAN detection was relying on.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/allocator.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/allocator.cpp b/tests/allocator.cpp index c3ade48..588e456 100644 --- a/tests/allocator.cpp +++ b/tests/allocator.cpp @@ -8,7 +8,11 @@ #if defined(__has_feature) # define ADDRESS_SANITIZER __has_feature(address_sanitizer) #else -# define ADDRESS_SANITIZER defined(__SANITIZE_ADDRESS__) +# if defined(__SANITIZE_ADDRESS__) +# define ADDRESS_SANITIZER 1 +# else +# define ADDRESS_SANITIZER 0 +# endif #endif // Low-level allocation functions |