summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexey Izbyshev <izbyshev@ispras.ru>2018-11-02 18:23:51 (GMT)
committerVictor Stinner <vstinner@redhat.com>2018-11-02 18:23:51 (GMT)
commit29abad099535f4bcb1531df93bafbd75b26d6adc (patch)
treeca4641e369fc66bc7187f4fdc77ab98088f37615
parent8d2f88fb17468642813108977bb9ec5f7a065b84 (diff)
downloadcpython-29abad099535f4bcb1531df93bafbd75b26d6adc.zip
cpython-29abad099535f4bcb1531df93bafbd75b26d6adc.tar.gz
cpython-29abad099535f4bcb1531df93bafbd75b26d6adc.tar.bz2
[3.6] bpo-35147: Fix _Py_NO_RETURN for GCC (GH-10300) (GH-10302)
Use `__GNUC__` instead of non-existing `__GNUC_MAJOR__`. (cherry picked from commit e2ed5adcb5db2d70cfa72da1ba8446f7aa9e05cd)
-rw-r--r--Include/pyerrors.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index c28c137..44f2030 100644
--- a/Include/pyerrors.h
+++ b/Include/pyerrors.h
@@ -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