diff options
| author | Tristan Partin <tristan@partin.io> | 2024-07-11 10:11:27 -0500 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2025-11-18 08:22:34 -0800 |
| commit | ccbc91c23393ad9754e1019c4ce5853cf5c8a8e3 (patch) | |
| tree | 27543d9a13b1dd22531d18845b3e1f4ba762a35a /mesonbuild/compilers | |
| parent | bf45777a1d979465abea3cd1ade8ff227eacdf9a (diff) | |
| download | meson-ccbc91c23393ad9754e1019c4ce5853cf5c8a8e3.tar.gz | |
Add support for the `counted_by` attribute
This is a new attribute released in GCC 15 and clang 18. It isn't
supported in C++ compilers at the moment.
Diffstat (limited to 'mesonbuild/compilers')
| -rw-r--r-- | mesonbuild/compilers/c_function_attributes.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/compilers/c_function_attributes.py b/mesonbuild/compilers/c_function_attributes.py index 4c8aa7054..e425dbfa2 100644 --- a/mesonbuild/compilers/c_function_attributes.py +++ b/mesonbuild/compilers/c_function_attributes.py @@ -30,6 +30,13 @@ C_FUNC_ATTRIBUTES = { 'int foo(void) __attribute__((constructor));', 'constructor_priority': 'int foo( void ) __attribute__((__constructor__(65535/2)));', + 'counted_by': + ''' + struct foo { + unsigned int count; + char bar[] __attribute__((counted_by(count))); + }; + ''', 'deprecated': 'int foo(void) __attribute__((deprecated("")));', 'destructor': |
