gmacros.h: add G_GNUC_*_IGNORE_DEPRECATIONS macros for clang
authorThomas Haller <thaller@redhat.com>
Fri, 1 Aug 2014 14:59:36 +0000 (16:59 +0200)
committerThomas Haller <thaller@redhat.com>
Fri, 22 Aug 2014 18:58:11 +0000 (20:58 +0200)
https://bugzilla.gnome.org/show_bug.cgi?id=734126

Signed-off-by: Thomas Haller <thaller@redhat.com>
glib/gmacros.h

index 6403a99..0bdfa55 100644 (file)
   __pragma (warning (disable : 4996))
 #define G_GNUC_END_IGNORE_DEPRECATIONS                 \
   __pragma (warning (pop))
+#elif defined (__clang__)
+#define G_GNUC_BEGIN_IGNORE_DEPRECATIONS \
+  _Pragma("clang diagnostic push") \
+  _Pragma("clang diagnostic ignored \"-Wdeprecated-declarations\"")
+#define G_GNUC_END_IGNORE_DEPRECATIONS \
+  _Pragma("clang diagnostic pop")
 #else
 #define G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 #define G_GNUC_END_IGNORE_DEPRECATIONS