Hi Martin, On 9/3/22 22:02, Alejandro Colomar wrote:
We thought about using this syntax int foo(char buf[.n], int n);
BTW, it would be useful if this syntax was accepted for void * too, especially since GNU C allows pointer arithmetic on void *.
void *memmove(void dest[.n], const void src[.n], size_t n);I understand that a void array doesn't make sense, so defining a VLA of type void is an error elsewhere, but since array parameters are not really arrays, and instead pointers, this could be reasonable.
The same that these "arrays" can have zero sizes, or even negative ones in some weird cases.
Cheers, Alex -- Alejandro Colomar <http://www.alejandro-colomar.es/>
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature