From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Sun, 28 Feb 2021 00:51:36 +0000 (-0800) Subject: bpo-43335: Update macro to check gcc version (GH-24662) X-Git-Tag: v3.9.3~71 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=132e31f4bf20818a469cbcdba75068f26cb19a65;p=thirdparty%2FPython%2Fcpython.git bpo-43335: Update macro to check gcc version (GH-24662) (cherry picked from commit bf9de7ab24d9d7068645b202bc47146b9a4f2726) Co-authored-by: Dong-hee Na --- diff --git a/Modules/_ctypes/callbacks.c b/Modules/_ctypes/callbacks.c index 19c77f4f57ef..e6e101829a69 100644 --- a/Modules/_ctypes/callbacks.c +++ b/Modules/_ctypes/callbacks.c @@ -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