mirror of
https://github.com/python/cpython.git
synced 2025-07-07 11:25:30 +00:00
gh-135927: Fix MSVC Clatest C builds (GH-135935)
This commit is contained in:
parent
d2154912b3
commit
a88b49c3f2
4 changed files with 6 additions and 4 deletions
|
@ -73,14 +73,14 @@
|
|||
# else
|
||||
# define _Py_ALIGNED_DEF(N, T) alignas(N) alignas(T) T
|
||||
# endif
|
||||
# elif defined(_MSC_VER)
|
||||
# define _Py_ALIGNED_DEF(N, T) __declspec(align(N)) T
|
||||
# elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
|
||||
# define _Py_ALIGNED_DEF(N, T) alignas(N) alignas(T) T
|
||||
# elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
|
||||
# define _Py_ALIGNED_DEF(N, T) _Alignas(N) _Alignas(T) T
|
||||
# elif (defined(__GNUC__) || defined(__clang__))
|
||||
# define _Py_ALIGNED_DEF(N, T) __attribute__((aligned(N))) T
|
||||
# elif defined(_MSC_VER)
|
||||
# define _Py_ALIGNED_DEF(N, T) __declspec(align(N)) T
|
||||
# else
|
||||
# define _Py_ALIGNED_DEF(N, T) _Alignas(N) _Alignas(T) T
|
||||
# endif
|
||||
|
|
|
@ -49,7 +49,8 @@
|
|||
// 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) \
|
||||
#if (defined(__GNUC__) || defined(__clang__)) && \
|
||||
(defined (__STDC_VERSION__) && __STDC_VERSION__ > 201710L) \
|
||||
|| (defined(__cplusplus) && __cplusplus >= 201103)
|
||||
# define _Py_NULL nullptr
|
||||
#else
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Fix building with MSVC when passing option ``/std:clatest``.
|
|
@ -3148,7 +3148,7 @@ static PyObject *
|
|||
math_issubnormal_impl(PyObject *module, double x)
|
||||
/*[clinic end generated code: output=4e76ac98ddcae761 input=9a20aba7107d0d95]*/
|
||||
{
|
||||
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
|
||||
#if !defined(_MSC_VER) && defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
|
||||
return PyBool_FromLong(issubnormal(x));
|
||||
#else
|
||||
return PyBool_FromLong(isfinite(x) && x && !isnormal(x));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue