Skip to content

Commit 29abad0

Browse files
Alexey Izbyshevvstinner
authored andcommitted
[3.6] bpo-35147: Fix _Py_NO_RETURN for GCC (GH-10300) (GH-10302)
Use `__GNUC__` instead of non-existing `__GNUC_MAJOR__`. (cherry picked from commit e2ed5ad)
1 parent 8d2f88f commit 29abad0

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
@@ -93,9 +93,9 @@ PyAPI_FUNC(void) PyErr_SetExcInfo(PyObject *, PyObject *, PyObject *);
9393
#endif
9494

9595
#if defined(__clang__) || \
96-
(defined(__GNUC_MAJOR__) && \
97-
((__GNUC_MAJOR__ >= 3) || \
98-
(__GNUC_MAJOR__ == 2) && (__GNUC_MINOR__ >= 5)))
96+
(defined(__GNUC__) && \
97+
((__GNUC__ >= 3) || \
98+
(__GNUC__ == 2) && (__GNUC_MINOR__ >= 5)))
9999
#define _Py_NO_RETURN __attribute__((__noreturn__))
100100
#else
101101
#define _Py_NO_RETURN

0 commit comments

Comments
 (0)