This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Variadic macros in installed headers


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).  But supporting C89 and C++ 
in our headers means any use of such C99 features in header declarations 
needs to be conditional.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]