Add new SENTINEL macro to compiler.h, for GCC's __attribute__((sentinel)).
[pspp-builds.git] / src / libpspp / compiler.h
index d22819446f5e5ee7a5eececf9c4f0e3ef261e758..d8b29e968965eaa4c96744928f1b92640cb32cf8 100644 (file)
 #define PURE_FUNCTION
 #endif
 
+/* This attribute indicates that the argument with the given
+   IDX must be a null pointer.  IDX counts backward in the
+   argument list, so that 0 is the last argument, 1 is the
+   second-from-last argument, and so on. */
+#if __GNUC__ > 3
+#define SENTINEL(IDX) ATTRIBUTE ((sentinel(IDX)))
+#else
+#define SENTINEL
+#endif
+
 #endif /* compiler.h */