summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Izbyshev <izbyshev@ispras.ru>2018-11-02 16:32:26 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-11-02 16:32:26 (GMT)
commite2ed5adcb5db2d70cfa72da1ba8446f7aa9e05cd (patch)
treee07beaa469ebb1e13cb0c9b75af3e2c1cc324a76
parentb942707fc23454a998323c17e30be78ff1a4f0e7 (diff)
downloadcpython-e2ed5adcb5db2d70cfa72da1ba8446f7aa9e05cd.zip
cpython-e2ed5adcb5db2d70cfa72da1ba8446f7aa9e05cd.tar.gz
cpython-e2ed5adcb5db2d70cfa72da1ba8446f7aa9e05cd.tar.bz2
bpo-35147: Fix _Py_NO_RETURN for GCC (GH-10300)
Use `__GNUC__` instead of non-existing `__GNUC_MAJOR__`. https://bugs.python.org/issue35147
-rw-r--r--Include/pyerrors.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index 4e29954..808e0de 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__))
#elif defined(_MSC_VER)
# define _Py_NO_RETURN __declspec(noreturn)