From 62dedcb09944aa1e2031b0cb844795f20f7572a5 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 29 Dec 2016 07:22:28 +0530 Subject: [PATCH] gmacros: Fix deprecations support with ICC ICC defines __GNUC__ (to emulate GCC), but has its own method of disabling deprecations. https://bugzilla.gnome.org/show_bug.cgi?id=776562 --- glib/gmacros.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/glib/gmacros.h b/glib/gmacros.h index ceb74289a..7b980fb34 100644 --- a/glib/gmacros.h +++ b/glib/gmacros.h @@ -165,7 +165,13 @@ #define G_GNUC_DEPRECATED_FOR(f) G_GNUC_DEPRECATED #endif /* __GNUC__ */ -#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) +#ifdef __ICC +#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ + _Pragma ("warning (push)") \ + _Pragma ("warning (disable:1478)") +#define G_GNUC_END_IGNORE_DEPRECATIONS \ + _Pragma ("warning (pop)") +#elif __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \ _Pragma ("GCC diagnostic push") \ _Pragma ("GCC diagnostic ignored \"-Wdeprecated-declarations\"")