From: Ned Deily Date: Thu, 5 Mar 2015 23:47:10 +0000 (-0800) Subject: Fix regression introduced by changeset 7c6e3358221a that caused compile X-Git-Tag: v3.5.0a2~20 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e37a1946c7196169b8d3117f65391a12bb8d97f7;p=thirdparty%2FPython%2Fcpython.git Fix regression introduced by changeset 7c6e3358221a that caused compile errors of _testcapimodule.c with older versions of gcc. --- diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 08aa9c701ca4..a8ce0dc4eb3b 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -69,7 +69,7 @@ test_config(PyObject *self) static PyObject* test_sizeof_c_types(PyObject *self) { -#ifdef __GNUC__ +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wtype-limits" #endif @@ -130,7 +130,7 @@ test_sizeof_c_types(PyObject *self) #undef IS_SIGNED #undef CHECK_SIGNESS #undef CHECK_SIZEOF -#ifdef __GNUC__ +#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5))) #pragma GCC diagnostic pop #endif }