File tree Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Expand file tree Collapse file tree 4 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 73
73
# else
74
74
# define _Py_ALIGNED_DEF (N, T ) alignas (N) alignas (T) T
75
75
# endif
76
+ # elif defined(_MSC_VER)
77
+ # define _Py_ALIGNED_DEF (N, T ) __declspec(align(N)) T
76
78
# elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L
77
79
# define _Py_ALIGNED_DEF (N, T ) alignas (N) alignas (T) T
78
80
# elif defined(__STDC_VERSION__) && __STDC_VERSION__ >= 201112L
79
81
# define _Py_ALIGNED_DEF (N, T ) _Alignas(N) _Alignas(T) T
80
82
# elif (defined(__GNUC__) || defined(__clang__))
81
83
# define _Py_ALIGNED_DEF (N, T ) __attribute__((aligned(N))) T
82
- # elif defined(_MSC_VER)
83
- # define _Py_ALIGNED_DEF (N, T ) __declspec(align(N)) T
84
84
# else
85
85
# define _Py_ALIGNED_DEF (N, T ) _Alignas(N) _Alignas(T) T
86
86
# endif
Original file line number Diff line number Diff line change 49
49
// Static inline functions should use _Py_NULL rather than using directly NULL
50
50
// to prevent C++ compiler warnings. On C23 and newer and on C++11 and newer,
51
51
// _Py_NULL is defined as nullptr.
52
- #if (defined (__STDC_VERSION__) && __STDC_VERSION__ > 201710L) \
52
+ #if (defined(__GNUC__) || defined(__clang__)) && \
53
+ (defined (__STDC_VERSION__) && __STDC_VERSION__ > 201710L ) \
53
54
|| (defined(__cplusplus) && __cplusplus >= 201103 )
54
55
# define _Py_NULL nullptr
55
56
#else
Original file line number Diff line number Diff line change
1
+ Fix building with MSVC when passing option ``/std:clatest ``.
Original file line number Diff line number Diff line change @@ -3148,7 +3148,7 @@ static PyObject *
3148
3148
math_issubnormal_impl (PyObject * module , double x )
3149
3149
/*[clinic end generated code: output=4e76ac98ddcae761 input=9a20aba7107d0d95]*/
3150
3150
{
3151
- #if defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 202311L
3151
+ #if !defined( _MSC_VER ) && defined(__STDC_VERSION__ ) && __STDC_VERSION__ >= 202311L
3152
3152
return PyBool_FromLong (issubnormal (x ));
3153
3153
#else
3154
3154
return PyBool_FromLong (isfinite (x ) && x && !isnormal (x ));
You can’t perform that action at this time.
0 commit comments