osdep: fix MP_NO_ASAN definition
This commit is contained in:
1 parent
1bcc17a7be
commit
2bd9c3229f
1 file changed
+6
-2
+6
-2
@@ -16,13 +16,11 @@
|
||||
#define MP_FALLTHROUGH __attribute__((fallthrough))
|
||||
#define MP_WARN_UNUSED_RESULT __attribute__((warn_unused_result))
|
||||
#define MP_UNUSED __attribute__((unused))
|
||||
#define MP_NO_ASAN __attribute__((no_sanitize("address")))
|
||||
#else
|
||||
#define MP_NORETURN
|
||||
#define MP_FALLTHROUGH do {} while (0)
|
||||
#define MP_WARN_UNUSED_RESULT
|
||||
#define MP_UNUSED
|
||||
#define MP_NO_ASAN
|
||||
#endif
|
||||
|
||||
#if defined(__STDC_VERSION__) && (__STDC_VERSION__ < 202311L) && !defined(thread_local)
|
||||
@@ -43,6 +41,12 @@
|
||||
#define MP_NONSTRING
|
||||
#endif
|
||||
|
||||
#if __has_attribute(no_sanitize)
|
||||
#define MP_NO_ASAN __attribute__((no_sanitize("address")))
|
||||
#else
|
||||
#define MP_NO_ASAN
|
||||
#endif
|
||||
|
||||
#ifndef NDEBUG
|
||||
#define MP_ASSERT_UNREACHABLE() assert(!"unreachable")
|
||||
#elif __has_builtin(__builtin_unreachable)
|
||||
|
||||
Reference in new issue
Block a user