[Python-checkins] [3.6] bpo-35147: Fix _Py_NO_RETURN for GCC (GH-10300) (GH-10302)

Victor Stinner webhook-mailer at python.org
Fri Nov 2 14:23:59 EDT 2018


https://github.com/python/cpython/commit/29abad099535f4bcb1531df93bafbd75b26d6adc
commit: 29abad099535f4bcb1531df93bafbd75b26d6adc
branch: 3.6
author: Alexey Izbyshev <izbyshev at ispras.ru>
committer: Victor Stinner <vstinner at redhat.com>
date: 2018-11-02T19:23:51+01:00
summary:

[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)

files:
M Include/pyerrors.h

diff --git a/Include/pyerrors.h b/Include/pyerrors.h
index c28c1373f82f..44f20303c299 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



More information about the Python-checkins mailing list