This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Variadic macros in installed headers
* Joseph Myers:
> On Mon, 25 Nov 2019, Florian Weimer wrote:
>
>> There is already weird syntax in this area:
>>
>> void f (unsigned n; int a[n], unsigned n);
>
> Note that the C2x charter says new functions should have size parameters
> before the array with that size, to allow
>
> void f(unsigned n, int a[static n]);
>
> to be used to declare that the array must be non-NULL and have at least n
> elements (without needing that GNU extension).
I think close to no one is doing that right now. So it's a bit odd
that C2X recommends this practice. I would expect the language to
change to accommodate existing practice on parameter order, and not
the other way round.