[glib] gmacros: Fix deprecations support with ICC



commit 62dedcb09944aa1e2031b0cb844795f20f7572a5
Author: Nirbheek Chauhan <nirbheek centricular com>
Date:   Thu Dec 29 07:22:28 2016 +0530

    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 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/glib/gmacros.h b/glib/gmacros.h
index ceb7428..7b980fb 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\"")


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]