aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Include/pyport.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/pyport.h')
-rw-r--r--Include/pyport.h24
1 files changed, 3 insertions, 21 deletions
diff --git a/Include/pyport.h b/Include/pyport.h
index 3eac119bf8e..89829373be2 100644
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -49,8 +49,9 @@
// Static inline functions should use _Py_NULL rather than using directly NULL
// to prevent C++ compiler warnings. On C23 and newer and on C++11 and newer,
// _Py_NULL is defined as nullptr.
-#if (defined (__STDC_VERSION__) && __STDC_VERSION__ > 201710L) \
- || (defined(__cplusplus) && __cplusplus >= 201103)
+#if !defined(_MSC_VER) && \
+ ((defined (__STDC_VERSION__) && __STDC_VERSION__ > 201710L) \
+ || (defined(__cplusplus) && __cplusplus >= 201103))
# define _Py_NULL nullptr
#else
# define _Py_NULL NULL
@@ -666,25 +667,6 @@ extern "C" {
#endif
-// _Py_NO_SANITIZE_UNDEFINED(): Disable Undefined Behavior sanitizer (UBsan)
-// on a function.
-//
-// Clang and GCC 9.0+ use __attribute__((no_sanitize("undefined"))).
-// GCC 4.9+ uses __attribute__((no_sanitize_undefined)).
-#if defined(__has_feature)
-# if __has_feature(undefined_behavior_sanitizer)
-# define _Py_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize("undefined")))
-# endif
-#endif
-#if !defined(_Py_NO_SANITIZE_UNDEFINED) && defined(__GNUC__) \
- && ((__GNUC__ >= 5) || (__GNUC__ == 4) && (__GNUC_MINOR__ >= 9))
-# define _Py_NO_SANITIZE_UNDEFINED __attribute__((no_sanitize_undefined))
-#endif
-#ifndef _Py_NO_SANITIZE_UNDEFINED
-# define _Py_NO_SANITIZE_UNDEFINED
-#endif
-
-
// _Py_NONSTRING: The nonstring variable attribute specifies that an object or
// member declaration with type array of char, signed char, or unsigned char,
// or pointer to such a type is intended to store character arrays that do not