From: Alexey Izbyshev Date: Sat, 3 Nov 2018 01:30:11 +0000 (+0300) Subject: [3.7] bpo-35147: Fix _Py_NO_RETURN for GCC (GH-10300) (GH-10301) X-Git-Tag: v3.7.2rc1~191 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a9122d183b1fbc4484d72aec69fc0979c7fd91f2;p=thirdparty%2FPython%2Fcpython.git [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 e2ed5adcb5db2d70cfa72da1ba8446f7aa9e05cd) https://bugs.python.org/issue35147 --- diff --git a/Include/pyerrors.h b/Include/pyerrors.h index f289471be20c..f49d4e8bd08c 100644 --- a/Include/pyerrors.h +++ b/Include/pyerrors.h @@ -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