summaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorTristan Partin <tristan@partin.io>2024-05-07 14:51:40 -0500
committerDylan Baker <dylan@pnwbakers.com>2024-05-07 15:33:32 -0700
commit8cb16b2d6a97514bf17aa8ca2f6bf098cfc5bcbf (patch)
treeeafe5a76fe3908c389ce27d4650af49ff794e795 /docs/markdown/snippets
parent23eb7ba700cd6c53d5491cc4f99c532629efa1e2 (diff)
downloadmeson-8cb16b2d6a97514bf17aa8ca2f6bf098cfc5bcbf.tar.gz
Add support for GCC's null_terminated_string_arg function attribute
This is new as of 14.1.
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/null_terminated_string_arg.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/markdown/snippets/null_terminated_string_arg.md b/docs/markdown/snippets/null_terminated_string_arg.md
new file mode 100644
index 000000000..2ba175575
--- /dev/null
+++ b/docs/markdown/snippets/null_terminated_string_arg.md
@@ -0,0 +1,13 @@
+## Added support for GCC's `null_terminated_string_arg` function attribute
+
+You can now check if a compiler support the `null_terminated_string_arg`
+function attribute via the `has_function_attribute()` method on the
+[[@compiler]] object.
+
+```meson
+cc = meson.get_compiler('c')
+
+if cc.has_function_attribute('null_terminated_string_arg')
+ # We have it...
+endif
+```