diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md index 8b05d494a..60303dad6 100644 --- a/docs/markdown/Reference-tables.md +++ b/docs/markdown/Reference-tables.md @@ -247,6 +247,7 @@ which are supported by GCC, Clang, and other compilers. | retain⁴ | | returns_nonnull | | section⁵ | +| sentinel⁵ | | unused | | used | | visibility* | diff --git a/mesonbuild/compilers/c_function_attributes.py b/mesonbuild/compilers/c_function_attributes.py index faa657038..f663bfcc4 100644 --- a/mesonbuild/compilers/c_function_attributes.py +++ b/mesonbuild/compilers/c_function_attributes.py @@ -94,6 +94,8 @@ C_FUNC_ATTRIBUTES = { #else extern int foo __attribute__((section(".bar"))); #endif''', + 'sentinel': + 'int foo(const char *bar, ...) __attribute__((sentinel));', 'unused': 'int foo(void) __attribute__((unused));', 'used': diff --git a/test cases/common/197 function attributes/meson.build b/test cases/common/197 function attributes/meson.build index 4b48cefc9..4d43ecd5d 100644 --- a/test cases/common/197 function attributes/meson.build +++ b/test cases/common/197 function attributes/meson.build @@ -50,6 +50,7 @@ attributes = [ 'nothrow', 'pure', 'section', + 'sentinel', 'unused', 'used', 'warn_unused_result',