From 492ebc22bc2a7bf6710d5e154dd6f37c120de4fd Mon Sep 17 00:00:00 2001 From: Arseny Kapoulkine Date: Fri, 10 Nov 2017 21:35:59 -0800 Subject: 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. --- tests/allocator.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3