[glib/wip/version-bounds: 1/3] gmacros: Add G_GNUC_UNAVAILABLE



commit 6c4879d5ca6fd1b9a828f2eb94b2fd8ca7300636
Author: Emmanuele Bassi <ebassi gnome org>
Date:   Mon Feb 20 16:19:31 2012 +0000

    gmacros: Add G_GNUC_UNAVAILABLE
    
    A macro to annotate a function as not available, when compiling with GCC.

 glib/gmacros.h |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/glib/gmacros.h b/glib/gmacros.h
index e07610c..bfa7b4c 100644
--- a/glib/gmacros.h
+++ b/glib/gmacros.h
@@ -138,6 +138,13 @@
 #define G_GNUC_WARN_UNUSED_RESULT
 #endif /* __GNUC__ */
 
+#if    __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+#define G_GNUC_UNAVAILABLE __attribute__((unavailable))
+#else
+#define G_GNUC_UNAVAILABLE
+#endif /* __GNUC__ */
+
+
 #ifndef G_DISABLE_DEPRECATED
 /* Wrap the gcc __PRETTY_FUNCTION__ and __FUNCTION__ variables with
  * macros, so we can refer to them as strings unconditionally.



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