util: Add ATTRIBUTE_RETURNS_NONNULL.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Matt Turner
2016-05-13 13:17:02 -07:00
parent 40c6d54e76
commit 377ab2f2d7
3 changed files with 14 additions and 0 deletions

View File

@@ -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));
],