From 8cb16b2d6a97514bf17aa8ca2f6bf098cfc5bcbf Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Tue, 7 May 2024 14:51:40 -0500 Subject: Add support for GCC's null_terminated_string_arg function attribute This is new as of 14.1. --- docs/markdown/snippets/null_terminated_string_arg.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 docs/markdown/snippets/null_terminated_string_arg.md (limited to 'docs/markdown/snippets') 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 +``` -- cgit v1.2.3