0
0
mirror of https://github.com/zeux/pugixml.git synced 2024-12-25 20:14:10 +08:00

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.
This commit is contained in:
Arseny Kapoulkine 2017-11-10 21:35:59 -08:00
parent ba9504325e
commit 492ebc22bc

View File

@ -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