projects
/
pspp-builds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
204a1ee
)
Add new SENTINEL macro to compiler.h, for GCC's __attribute__((sentinel)).
author
Ben Pfaff
<blp@gnu.org>
Mon, 21 Dec 2009 04:00:47 +0000
(20:00 -0800)
committer
Ben Pfaff
<blp@gnu.org>
Tue, 5 Jan 2010 05:05:50 +0000
(21:05 -0800)
src/libpspp/compiler.h
patch
|
blob
|
history
diff --git
a/src/libpspp/compiler.h
b/src/libpspp/compiler.h
index d22819446f5e5ee7a5eececf9c4f0e3ef261e758..d8b29e968965eaa4c96744928f1b92640cb32cf8 100644
(file)
--- a/
src/libpspp/compiler.h
+++ b/
src/libpspp/compiler.h
@@
-77,4
+77,14
@@
#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 */