diff options
author | Tim-Philipp Müller <tim@centricular.com> | 2020-06-21 17:31:59 +0100 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-06-21 23:34:11 +0300 |
commit | 246e5437aaf213401a22361a55c46e70a4eb505d (patch) | |
tree | b9a16361bd60e3fee6f4916dbd86bd015b7b86d4 | |
parent | da018da7539d016258c5c5f44d51ee28a7e86eee (diff) | |
download | meson-246e5437aaf213401a22361a55c46e70a4eb505d.zip meson-246e5437aaf213401a22361a55c46e70a4eb505d.tar.gz meson-246e5437aaf213401a22361a55c46e70a4eb505d.tar.bz2 |
compiler: add 'force_align_arg_pointer' function attribute
-rw-r--r-- | docs/markdown/Reference-tables.md | 89 | ||||
-rw-r--r-- | mesonbuild/compilers/c_function_attributes.py | 2 |
2 files changed, 48 insertions, 43 deletions
diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md index 48f43f9..3be129f 100644 --- a/docs/markdown/Reference-tables.md +++ b/docs/markdown/Reference-tables.md @@ -198,49 +198,50 @@ These values are supported using the GCC style `__attribute__` annotations, which are supported by GCC, Clang, and other compilers. -| Name | -|----------------------| -| alias | -| aligned | -| alloc_size | -| always_inline | -| artificial | -| cold | -| const | -| constructor | -| constructor_priority | -| deprecated | -| destructor | -| error | -| externally_visible | -| fallthrough | -| flatten | -| format | -| format_arg | -| gnu_inline | -| hot | -| ifunc | -| malloc | -| noclone | -| noinline | -| nonnull | -| noreturn | -| nothrow | -| optimize | -| packed | -| pure | -| returns_nonnull | -| unused | -| used | -| visibility* | -| visibility:default†| -| visibility:hidden†| -| visibility:internal†| -| visibility:protected†| -| warning | -| warn_unused_result | -| weak | -| weakreaf | +| Name | +|--------------------------| +| alias | +| aligned | +| alloc_size | +| always_inline | +| artificial | +| cold | +| const | +| constructor | +| constructor_priority | +| deprecated | +| destructor | +| error | +| externally_visible | +| fallthrough | +| flatten | +| format | +| format_arg | +| force_align_arg_pointer³ | +| gnu_inline | +| hot | +| ifunc | +| malloc | +| noclone | +| noinline | +| nonnull | +| noreturn | +| nothrow | +| optimize | +| packed | +| pure | +| returns_nonnull | +| unused | +| used | +| visibility* | +| visibility:default†| +| visibility:hidden†| +| visibility:internal†| +| visibility:protected†| +| warning | +| warn_unused_result | +| weak | +| weakreaf | \* *Changed in 0.52.0* the "visibility" target no longer includes "protected", which is not present in Apple's clang. @@ -248,6 +249,8 @@ which are supported by GCC, Clang, and other compilers. †*New in 0.52.0* These split visibility attributes are preferred to the plain "visibility" as they provide narrower checks. +³ *New in 0.55.0* + ### MSVC __declspec These values are supported using the MSVC style `__declspec` annotation, diff --git a/mesonbuild/compilers/c_function_attributes.py b/mesonbuild/compilers/c_function_attributes.py index e5de485..f31229e 100644 --- a/mesonbuild/compilers/c_function_attributes.py +++ b/mesonbuild/compilers/c_function_attributes.py @@ -56,6 +56,8 @@ C_FUNC_ATTRIBUTES = { 'int foo(const char * p, ...) __attribute__((format(printf, 1, 2)));', 'format_arg': 'char * foo(const char * p) __attribute__((format_arg(1)));', + 'force_align_arg_pointer': + '__attribute__((force_align_arg_pointer)) int foo(void) { return 0; }', 'gnu_inline': 'inline __attribute__((gnu_inline)) int foo(void) { return 0; }', 'hot': |