summaryrefslogtreecommitdiffstats
path: root/src/H5detect.c
diff options
context:
space:
mode:
authorJerome Soumagne <jsoumagne@hdfgroup.org>2018-07-16 18:33:23 (GMT)
committerJerome Soumagne <jsoumagne@hdfgroup.org>2018-07-16 18:33:23 (GMT)
commitd5e7134df911808bba26ac6629e1fe8324916585 (patch)
tree3ae60f9cfd6e9e0c8e0f78ee48f538220334ff88 /src/H5detect.c
parent643593dfda47f0dfe2159ae494a1f80142da3f4e (diff)
downloadhdf5-d5e7134df911808bba26ac6629e1fe8324916585.zip
hdf5-d5e7134df911808bba26ac6629e1fe8324916585.tar.gz
hdf5-d5e7134df911808bba26ac6629e1fe8324916585.tar.bz2
Fix evaluation of __has_attribute(no_sanitize_address) on older GCC versions
Diffstat (limited to 'src/H5detect.c')
-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