Skip to content

Commit a9122d1

Browse files
Alexey Izbyshevmiss-islington
authored andcommitted
[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 e2ed5ad) https://bugs.python.org/issue35147
1 parent 08026b1 commit a9122d1

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
#else
102102
#define _Py_NO_RETURN

0 commit comments

Comments
 (0)