summaryrefslogtreecommitdiff
path: root/glib/gmacros.h
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2014-08-01 16:59:36 +0200
committerThomas Haller <thaller@redhat.com>2014-08-22 20:58:11 +0200
commit35eaf037bdfca985abf5d349e7355f1d2ed9c77b (patch)
treea865136a92b695618230fa683d7127ed3212953d /glib/gmacros.h
parentcb320cb5feb78a5a06651d3223914d9099a6f212 (diff)
downloadglib-35eaf037bdfca985abf5d349e7355f1d2ed9c77b.tar.gz
gmacros.h: add G_GNUC_*_IGNORE_DEPRECATIONS macros for clang
https://bugzilla.gnome.org/show_bug.cgi?id=734126 Signed-off-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'glib/gmacros.h')
-rw-r--r--glib/gmacros.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/glib/gmacros.h b/glib/gmacros.h
index 6403a9960..0bdfa5540 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -121,6 +121,12 @@
__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