This compile warning is produced by gcc 8.x:
src/misc.c:42:32: warning: unknown option after '#pragma GCC diagnostic' kind
[-Wpragmas]
#pragma GCC diagnostic ignored "-Wprio-ctor-dtor"
^~~~~~~~~~~~~~~~~~
Compile option -Wno-prio-ctor-dtor is supported since gcc 9.0.0.
---
mingw-w64-libraries/winpthreads/src/misc.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mingw-w64-libraries/winpthreads/src/misc.c
b/mingw-w64-libraries/winpthreads/src/misc.c
index 8930550b862f..d000dde4862a 100644
--- a/mingw-w64-libraries/winpthreads/src/misc.c
+++ b/mingw-w64-libraries/winpthreads/src/misc.c
@@ -38,7 +38,7 @@ HRESULT (WINAPI *_pthread_set_thread_description) (HANDLE,
PCWSTR) = NULL;
BOOL (WINAPI *_pthread_get_handle_information) (HANDLE, LPDWORD) = NULL;
#if defined(__GNUC__) || defined(__clang__)
-#if !defined(__clang__)
+#if __GNUC__ >= 9 && !defined(__clang__)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wprio-ctor-dtor"
#endif
@@ -71,7 +71,7 @@ static void winpthreads_init(void)
(HRESULT (WINAPI *)(HANDLE, PCWSTR))(void*) GetProcAddress(mod,
"SetThreadDescription");
}
}
-#if defined(__GNUC__) && !defined(__clang__)
+#if defined(__GNUC__) && __GNUC__ >= 9 && !defined(__clang__)
#pragma GCC diagnostic pop
#endif
--
2.20.1
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public