Date: Sun, 14 Nov 2021 20:48:43 +0100
On 11/14/21 20:41, Alejandro Colomar (man-pages) wrote:
> Yup, it's a weird and rarely-used syntax
> (IMHO, because it's not very well designed,
> and also because it's ignored by all compilers).
> Let me clarify it:
>
> '[static n]' means that both:
>
> - The pointer cannot be NULL.
> - the array has at least 'n' elements.
>
> '[n]' means:
>
> - nothing at all. 'n' is ignored.
>
> '[restrict n]' means:
>
> - 'n' is ignored.
> - the storage may not overlap any other 'restrict' pointers or arrays.
>
> '[static restrict n]' means:
>
> - The pointer cannot be NULL.
> - the array has at least 'n' elements.
AND
- the storage may not overlap any other 'restrict' pointers or arrays.
I missed it.
> Yup, it's a weird and rarely-used syntax
> (IMHO, because it's not very well designed,
> and also because it's ignored by all compilers).
> Let me clarify it:
>
> '[static n]' means that both:
>
> - The pointer cannot be NULL.
> - the array has at least 'n' elements.
>
> '[n]' means:
>
> - nothing at all. 'n' is ignored.
>
> '[restrict n]' means:
>
> - 'n' is ignored.
> - the storage may not overlap any other 'restrict' pointers or arrays.
>
> '[static restrict n]' means:
>
> - The pointer cannot be NULL.
> - the array has at least 'n' elements.
AND
- the storage may not overlap any other 'restrict' pointers or arrays.
I missed it.
Received on 2021-11-14 13:48:46