summaryrefslogtreecommitdiff
path: root/docs/markdown/snippets/null_terminated_string_arg.md
blob: 2ba1755758f8c985c0621a710bf79a85ed5d5c7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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
```