]> granicus.if.org Git - python/commitdiff
bpo-35147: Fix _Py_NO_RETURN for GCC (GH-10300)
authorAlexey Izbyshev <izbyshev@ispras.ru>
Fri, 2 Nov 2018 16:32:26 +0000 (19:32 +0300)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 2 Nov 2018 16:32:26 +0000 (09:32 -0700)
Use `__GNUC__` instead of non-existing `__GNUC_MAJOR__`.

https://bugs.python.org/issue35147

Include/pyerrors.h

index 4e2995469f3c2dca1a49da2a8f6db1b1bd297fd4..808e0def06b45c7ba9d08ebd2daa9b646a300552 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__))
 #elif defined(_MSC_VER)
 #  define _Py_NO_RETURN __declspec(noreturn)