Commit e2ed5adc authored by Alexey Izbyshev's avatar Alexey Izbyshev Committed by Miss Islington (bot)

bpo-35147: Fix _Py_NO_RETURN for GCC (GH-10300)



Use `__GNUC__` instead of non-existing `__GNUC_MAJOR__`.





https://bugs.python.org/issue35147
parent b942707f
...@@ -94,9 +94,9 @@ PyAPI_FUNC(void) PyErr_SetExcInfo(PyObject *, PyObject *, PyObject *); ...@@ -94,9 +94,9 @@ PyAPI_FUNC(void) PyErr_SetExcInfo(PyObject *, PyObject *, PyObject *);
#endif #endif
#if defined(__clang__) || \ #if defined(__clang__) || \
(defined(__GNUC_MAJOR__) && \ (defined(__GNUC__) && \
((__GNUC_MAJOR__ >= 3) || \ ((__GNUC__ >= 3) || \
(__GNUC_MAJOR__ == 2) && (__GNUC_MINOR__ >= 5))) (__GNUC__ == 2) && (__GNUC_MINOR__ >= 5)))
# define _Py_NO_RETURN __attribute__((__noreturn__)) # define _Py_NO_RETURN __attribute__((__noreturn__))
#elif defined(_MSC_VER) #elif defined(_MSC_VER)
# define _Py_NO_RETURN __declspec(noreturn) # define _Py_NO_RETURN __declspec(noreturn)
......
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