From 83a74d205af04f90f02b6478e5d79a299f443f22 Mon Sep 17 00:00:00 2001 From: Duncan Coutts <duncan@well-typed.com> Date: Thu, 19 Oct 2023 15:54:08 +0200 Subject: [PATCH] Conditionally ignore some GCC warnings Some GCC versions don't know about some warnings, and they complain that we're ignoring unknown warnings. So we try to ignore the warning based on the GCC version. --- rts/IOManager.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rts/IOManager.c b/rts/IOManager.c index 1e82e72e7428..e05c099047fe 100644 --- a/rts/IOManager.c +++ b/rts/IOManager.c @@ -74,7 +74,9 @@ * simply disable these two warnings for the whole file. */ #pragma GCC diagnostic push +#if __GNUC__ >= 5 #pragma GCC diagnostic ignored "-Wsuggest-attribute=noreturn" +#endif #pragma GCC diagnostic ignored "-Wmissing-noreturn" #pragma GCC diagnostic ignored "-Wunused-parameter" -- GitLab