Commit 0c998e12 authored by Ronan's avatar Ronan

fix(compiler): define BCTBX_DISABLE_UBSAN if attribute is not present + check gcc version

parent 2ba059ae
......@@ -37,8 +37,10 @@
#ifdef __has_attribute
#if __has_attribute(no_sanitize)
#define BCTBX_DISABLE_UBSAN __attribute__((no_sanitize("undefined")))
#endif
#elif defined(__GNUC__) && !defined(__MINGW32__)
#else
#define BCTBX_DISABLE_UBSAN
#endif // __has_attribute(no_sanitize)
#elif defined(__GNUC__) && !defined(__MINGW32__) && GCC_VERSION >= 40900
#define BCTBX_DISABLE_UBSAN __attribute__((no_sanitize("undefined")))
#else
#define BCTBX_DISABLE_UBSAN
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment