[3.7] bpo-35147: Fix _Py_NO_RETURN for GCC (GH-10300) (GH-10301)
Use `__GNUC__` instead of non-existing `__GNUC_MAJOR__`.
(cherry picked from commit e2ed5adcb5
)
https://bugs.python.org/issue35147
This commit is contained in:
parent
08026b103e
commit
a9122d183b
|
@ -94,9 +94,9 @@ PyAPI_FUNC(void) PyErr_SetExcInfo(PyObject *, PyObject *, PyObject *);
|
|||
#endif
|
||||
|
||||
#if defined(__clang__) || \
|
||||
(defined(__GNUC_MAJOR__) && \
|
||||
((__GNUC_MAJOR__ >= 3) || \
|
||||
(__GNUC_MAJOR__ == 2) && (__GNUC_MINOR__ >= 5)))
|
||||
(defined(__GNUC__) && \
|
||||
((__GNUC__ >= 3) || \
|
||||
(__GNUC__ == 2) && (__GNUC_MINOR__ >= 5)))
|
||||
#define _Py_NO_RETURN __attribute__((__noreturn__))
|
||||
#else
|
||||
#define _Py_NO_RETURN
|
||||
|
|
Loading…
Reference in New Issue