diff --git a/lib/zip_source_file_win32.h b/lib/zip_source_file_win32.h
index d86069ec..86ef2651 100644
--- a/lib/zip_source_file_win32.h
+++ b/lib/zip_source_file_win32.h
@@ -76,6 +76,9 @@ int _zip_win32_error_to_errno(DWORD win32err);
 #ifdef __clang__
 #define DONT_WARN_INCOMPATIBLE_FN_PTR_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wincompatible-function-pointer-types\"")
 #define DONT_WARN_INCOMPATIBLE_FN_PTR_END _Pragma("GCC diagnostic pop")
+#elif defined(__GNUC__) && __GNUC__ > 13
+#define DONT_WARN_INCOMPATIBLE_FN_PTR_BEGIN _Pragma("GCC diagnostic push") _Pragma("GCC diagnostic ignored \"-Wincompatible-pointer-types\"")
+#define DONT_WARN_INCOMPATIBLE_FN_PTR_END _Pragma("GCC diagnostic pop")
 #else
 #define DONT_WARN_INCOMPATIBLE_FN_PTR_BEGIN
 #define DONT_WARN_INCOMPATIBLE_FN_PTR_END
