]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43335: Update macro to check gcc version (GH-24662)
authorDong-hee Na <donghee.na@python.org>
Sun, 28 Feb 2021 00:16:24 +0000 (09:16 +0900)
committerGitHub <noreply@github.com>
Sun, 28 Feb 2021 00:16:24 +0000 (09:16 +0900)
Modules/_ctypes/callbacks.c

index 654cb93dcf7776d2d3330f53ec294cc9fa0ceab4..5a4d1c543f1009410ab7c63bdb8c79cd252225ec 100644 (file)
@@ -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