]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.6] bpo-35147: Fix _Py_NO_RETURN for GCC (GH-10300) (GH-10302)
authorAlexey Izbyshev <izbyshev@ispras.ru>
Fri, 2 Nov 2018 18:23:51 +0000 (21:23 +0300)
committerVictor Stinner <vstinner@redhat.com>
Fri, 2 Nov 2018 18:23:51 +0000 (19:23 +0100)
Use `__GNUC__` instead of non-existing `__GNUC_MAJOR__`.

(cherry picked from commit e2ed5adcb5db2d70cfa72da1ba8446f7aa9e05cd)

Include/pyerrors.h

index c28c1373f82f2b75a1ac6a025d2fc11eb4473a60..44f20303c299ba5d1db723770da7af5f935ba81d 100644 (file)
@@ -93,9 +93,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