From 8cb16b2d6a97514bf17aa8ca2f6bf098cfc5bcbf Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Tue, 7 May 2024 14:51:40 -0500 Subject: Add support for GCC's null_terminated_string_arg function attribute This is new as of 14.1. --- mesonbuild/compilers/c_function_attributes.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mesonbuild/compilers/c_function_attributes.py') diff --git a/mesonbuild/compilers/c_function_attributes.py b/mesonbuild/compilers/c_function_attributes.py index eec872b5f..a7258a1ca 100644 --- a/mesonbuild/compilers/c_function_attributes.py +++ b/mesonbuild/compilers/c_function_attributes.py @@ -80,6 +80,8 @@ C_FUNC_ATTRIBUTES = { 'int foo(void) __attribute__((noreturn));', 'nothrow': 'int foo(void) __attribute__((nothrow));', + 'null_terminated_string_arg': + 'int foo(const char * p) __attribute__((null_terminated_string_arg(1)));', 'optimize': '__attribute__((optimize(3))) int foo(void) { return 0; }', 'packed': -- cgit v1.2.3