Add cc.has_function_attribute('sentinel')

pull/9752/head
Tristan Partin 3 years ago committed by Eli Schwartz
parent 5d438b6aed
commit 8d918e0147
  1. 1
      docs/markdown/Reference-tables.md
  2. 2
      mesonbuild/compilers/c_function_attributes.py
  3. 1
      test cases/common/197 function attributes/meson.build

@ -247,6 +247,7 @@ which are supported by GCC, Clang, and other compilers.
| retain⁴ |
| returns_nonnull |
| section⁵ |
| sentinel⁵ |
| unused |
| used |
| visibility* |

@ -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':

@ -50,6 +50,7 @@ attributes = [
'nothrow',
'pure',
'section',
'sentinel',
'unused',
'used',
'warn_unused_result',

Loading…
Cancel
Save