summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2018-07-16 18:33:23 (GMT)
committerM. Scot Breitenfeld <brtnfld@hdfgroup.org>2018-07-26 22:19:24 (GMT)
commit81f4245a7c9623fc97df9644d74ea744e4e94e8c (patch)
treee8328e01bde7ec69a302cada27ede366a2af2d31
parentd0362ce438aef8ad690d5b084d929403c9877107 (diff)
downloadhdf5-81f4245a7c9623fc97df9644d74ea744e4e94e8c.zip
hdf5-81f4245a7c9623fc97df9644d74ea744e4e94e8c.tar.gz
hdf5-81f4245a7c9623fc97df9644d74ea744e4e94e8c.tar.bz2
Fix evaluation of __has_attribute(no_sanitize_address) on older GCC versions
-rw-r--r--src/H5detect.c10
1 files 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