summaryrefslogtreecommitdiff
path: root/m4/ax_gcc_func_attribute.m4
diff options
context:
space:
mode:
authorCorey Farrell <git@cfware.com>2017-11-11 01:04:27 -0500
committerCorey Farrell <git@cfware.com>2017-11-11 10:58:25 -0500
commit21835b37a44eca08d798d9059b2876e0c295318c (patch)
tree3b1a54a6dc786d9a014a99d7c0a2f1a44e2a2a75 /m4/ax_gcc_func_attribute.m4
parent42e829c6dbf65af7717056b7708364b4673136d4 (diff)
downloadautoconf-archive-21835b37a44eca08d798d9059b2876e0c295318c.tar.gz
AX_GCC_FUNC_ATTRIBUTE: Add support for 'sentinel' attribute.
Diffstat (limited to 'm4/ax_gcc_func_attribute.m4')
-rw-r--r--m4/ax_gcc_func_attribute.m410
1 files changed, 9 insertions, 1 deletions
diff --git a/m4/ax_gcc_func_attribute.m4 b/m4/ax_gcc_func_attribute.m4
index a9a58ec..098c9aa 100644
--- a/m4/ax_gcc_func_attribute.m4
+++ b/m4/ax_gcc_func_attribute.m4
@@ -54,6 +54,8 @@
# nothrow
# optimize
# pure
+# sentinel
+# sentinel_position
# unused
# used
# visibility
@@ -75,7 +77,7 @@
# and this notice are preserved. This file is offered as-is, without any
# warranty.
-#serial 8
+#serial 9
AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
@@ -179,6 +181,12 @@ AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
[pure], [
int foo( void ) __attribute__(($1));
],
+ [sentinel], [
+ int foo(void *p, ...) __attribute__(($1));
+ ],
+ [sentinel_position], [
+ int foo(void *p, ...) __attribute__(($1(1)));
+ ],
[returns_nonnull], [
void *foo( void ) __attribute__(($1));
],