From 377ab2f2d781aef9408f26b24bb8b17426be6606 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Fri, 13 May 2016 13:17:02 -0700 Subject: util: Add ATTRIBUTE_RETURNS_NONNULL. Reviewed-by: Kenneth Graunke --- m4/ax_gcc_func_attribute.m4 | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'm4') diff --git a/m4/ax_gcc_func_attribute.m4 b/m4/ax_gcc_func_attribute.m4 index 4e0ecbb..2e67ea2 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)); ], -- cgit v1.1