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
This commit is contained in:
Nirbheek Chauhan 2016-12-29 07:22:28 +05:30 committed by Philip Withnall
parent 5b64522fcb
commit 62dedcb099

View File

@ -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\"")