]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.7] bpo-35147: Fix _Py_NO_RETURN for GCC (GH-10300) (GH-10301) 10312/head
authorAlexey Izbyshev <izbyshev@ispras.ru>
Sat, 3 Nov 2018 01:30:11 +0000 (04:30 +0300)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 3 Nov 2018 01:30:11 +0000 (18:30 -0700)
Use `__GNUC__` instead of non-existing `__GNUC_MAJOR__`.

(cherry picked from commit e2ed5adcb5db2d70cfa72da1ba8446f7aa9e05cd)

https://bugs.python.org/issue35147

Include/pyerrors.h

index f289471be20ccf93fbbb631ae93f864493f57738..f49d4e8bd08c28a73844b4b2e6d8bed06574f002 100644 (file)
@@ -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