NS_FORBIDDEN
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 164 fa6388d0a0da8b02a6de7c99bb09ca58d2dd2013
permissions -rw-r--r--
State as of now

* * *

diff --git a/xpcom/base/nscore.h b/xpcom/base/nscore.h
--- a/xpcom/base/nscore.h
+++ b/xpcom/base/nscore.h
@@ -473,6 +473,12 @@ typedef PRUint32 nsrefcnt;
 #define NS_UNLIKELY(x)  (!!(x))
 #endif
 
+#if defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 3
+#define NS_FORBIDDEN(reason) __attribute__((error(reason)))
+#else
+#define NS_FORBIDDEN(reason)
+#endif
+
  /*
   * If we're being linked as standalone glue, we don't want a dynamic dependency
   * on NSPR libs, so we skip the debug thread-safety checks, and we cannot use