0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-07-24 10:25:42 -04:00
nasm/autoconf/m4/pa_common_attributes.m4
H. Peter Anvin 25757f83c5 autoconf: update some of the m4 library
Update some files in the m4 library. This also updates
config/unconfig.h to match.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2024-11-04 10:19:43 -08:00

21 lines
908 B
Plaintext

dnl --------------------------------------------------------------------------
dnl PA_COMMON_ATTRIBUTES
dnl
dnl Test for a bunch of common function attributes and define macros for them.
dnl --------------------------------------------------------------------------
AC_DEFUN([PA_COMMON_ATTRIBUTES],
[PA_ADD_CPPFLAGS([-Werror=attributes])
PA_FUNC_ATTRIBUTE(noreturn)
PA_FUNC_ATTRIBUTE(returns_nonnull,,[void *],,,never_null)
PA_FUNC_ATTRIBUTE(malloc,,[void *])
PA_FUNC_ATTRIBUTE(alloc_size,[1],[void *],[int],[80])
PA_FUNC_ATTRIBUTE(alloc_size,[1,2],[void *],[int,int],[20,40])
PA_FUNC_ATTRIBUTE(sentinel,,,[const char *, ...],["a","b",NULL],end_with_null)
PA_FUNC_ATTRIBUTE(format,[printf,1,2],int,[const char *, ...],["%d",1])
PA_FUNC_ATTRIBUTE(const)
PA_FUNC_ATTRIBUTE(pure)
PA_FUNC_ATTRIBUTE(cold,,,,,unlikely_func)
PA_FUNC_ATTRIBUTE(used)
PA_FUNC_ATTRIBUTE(unused)
PA_FUNC_ATTRIBUTE_ERROR])