From d5e7134df911808bba26ac6629e1fe8324916585 Mon Sep 17 00:00:00 2001 From: Jerome Soumagne Date: Mon, 16 Jul 2018 13:33:23 -0500 Subject: Fix evaluation of __has_attribute(no_sanitize_address) on older GCC versions --- src/H5detect.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/H5detect.c b/src/H5detect.c index 60ef656..2d33a3d 100644 --- a/src/H5detect.c +++ b/src/H5detect.c @@ -54,10 +54,14 @@ static const char *FileHeader = "\n\ #include "H5Tpublic.h" #include "H5Rpublic.h" -#if defined(__has_attribute) && __has_attribute(no_sanitize_address) -#define HDF_NO_UBSAN __attribute__((no_sanitize_address)) +#if defined(__has_attribute) +# if __has_attribute(no_sanitize_address) +# define HDF_NO_UBSAN __attribute__((no_sanitize_address)) +# else +# define HDF_NO_UBSAN +# endif #else -#define HDF_NO_UBSAN +# define HDF_NO_UBSAN #endif #define MAXDETECT 64 -- cgit v0.12