8000 bpo-43335: Update macro to check gcc version (GH-24662) · python/cpython@bf9de7a · GitHub
[go: up one dir, main page]

Skip to content

Commit bf9de7a

Browse files
authored
bpo-43335: Update macro to check gcc version (GH-24662)
1 parent c71d24f commit bf9de7a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_ctypes/callbacks.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable,
431431
#pragma clang diagnostic push
432432
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
433433
#endif
434-
#if defined(__GNUC__)
434+
#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))
435435
#pragma GCC diagnostic push
436436
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
437437
#endif
@@ -440,7 +440,7 @@ CThunkObject *_ctypes_alloc_callback(PyObject *callable,
440440
#if defined(__clang__) || defined(MACOSX)
441441
#pragma clang diagnostic pop
442442
#endif
443-
#if defined(__GNUC__)
443+
#if defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ > 5)))
444444
#pragma GCC diagnostic pop
445445
#endif
446446

0 commit comments

Comments
 (0)
0