]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43335: Update macro to check gcc version (GH-24662)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sun, 28 Feb 2021 00:51:36 +0000 (16:51 -0800)
committerGitHub <noreply@github.com>
Sun, 28 Feb 2021 00:51:36 +0000 (16:51 -0800)
(cherry picked from commit bf9de7ab24d9d7068645b202bc47146b9a4f2726)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
Modules/_ctypes/callbacks.c

index 19c77f4f57ef5a413fdcffbe1d42a7a111618dd0..e6e101829a6995defd36c8d7e844f26e4c5c24e3 100644 (file)
@@ -430,7 +430,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
@@ -439,7 +439,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