summaryrefslogtreecommitdiffstats
path: root/m4/ax_gcc_func_attribute.m4
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-05-13 13:17:02 -0700
committerMatt Turner <[email protected]>2016-05-16 11:06:15 -0700
commit377ab2f2d781aef9408f26b24bb8b17426be6606 (patch)
treec8b863c2af4344c669590c3561091d13c5b66a68 /m4/ax_gcc_func_attribute.m4
parent40c6d54e76c5e5859a78841ed305935b2ca6922c (diff)
util: Add ATTRIBUTE_RETURNS_NONNULL.
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'm4/ax_gcc_func_attribute.m4')
-rw-r--r--m4/ax_gcc_func_attribute.m47
1 files changed, 7 insertions, 0 deletions
diff --git a/m4/ax_gcc_func_attribute.m4 b/m4/ax_gcc_func_attribute.m4
index 4e0ecbb56c5..2e67ea2926d 100644
--- a/m4/ax_gcc_func_attribute.m4
+++ b/m4/ax_gcc_func_attribute.m4
@@ -53,6 +53,7 @@
# optimize
# packed
# pure
+# returns_nonnull
# unused
# used
# visibility
@@ -76,6 +77,9 @@
#serial 2
+# mattst88:
+# Added support for returns_nonnull attribute
+
AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
AS_VAR_PUSHDEF([ac_var], [ax_cv_have_func_attribute_$1])
@@ -175,6 +179,9 @@ AC_DEFUN([AX_GCC_FUNC_ATTRIBUTE], [
[pure], [
int foo( void ) __attribute__(($1));
],
+ [returns_nonnull], [
+ int *foo( void ) __attribute__(($1));
+ ],
[unused], [
int foo( void ) __attribute__(($1));
],