summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorDong-hee Na <donghee.na@python.org>2021-02-28 00:16:24 (GMT)
committerGitHub <noreply@github.com>2021-02-28 00:16:24 (GMT)
commitbf9de7ab24d9d7068645b202bc47146b9a4f2726 (patch)
treead231ac0c088e24e9bc10a7da9194d05b2465ace /Modules
parentc71d24f55828e7f0f2c8750d2e1b04d04539beff (diff)
downloadcpython-bf9de7ab24d9d7068645b202bc47146b9a4f2726.zip
cpython-bf9de7ab24d9d7068645b202bc47146b9a4f2726.tar.gz
cpython-bf9de7ab24d9d7068645b202bc47146b9a4f2726.tar.bz2
bpo-43335: Update macro to check gcc version (GH-24662)
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_ctypes/callbacks.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c
index 654cb93..5a4d1c5 100644
--- a/Modules/_ctypes/callbacks.c
+++ b/Modules/_ctypes/callbacks.c
@@ -431,7 +431,7 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable,
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
-#if defined(__GNUC__)
+#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
@@ -440,7 +440,7 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable,
#if defined(__clang__) || defined(MACOSX)
#pragma clang diagnostic pop
#endif
-#if defined(__GNUC__)
+#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))
#pragma GCC diagnostic pop
#endif