Skip to content

Commit e2ed5ad

Browse files
Alexey Izbyshevmiss-islington
authored andcommitted
bpo-35147: Fix _Py_NO_RETURN for GCC (GH-10300)
Use `__GNUC__` instead of non-existing `__GNUC_MAJOR__`. https://bugs.python.org/issue35147
1 parent b942707 commit e2ed5ad

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Include/pyerrors.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,9 +94,9 @@ PyAPI_FUNC(void) PyErr_SetExcInfo(PyObject *, PyObject *, PyObject *);
9494
#endif
9595

9696
#if defined(__clang__) || \
97-
(defined(__GNUC_MAJOR__) && \
98-
((__GNUC_MAJOR__ >= 3) || \
99-
(__GNUC_MAJOR__ == 2) && (__GNUC_MINOR__ >= 5)))
97+
(defined(__GNUC__) && \
98+
((__GNUC__ >= 3) || \
99+
(__GNUC__ == 2) && (__GNUC_MINOR__ >= 5)))
100100
# define _Py_NO_RETURN __attribute__((__noreturn__))
101101
#elif defined(_MSC_VER)
102102
# define _Py_NO_RETURN __declspec(noreturn)

0 commit comments

Comments
 (0)