This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Variadic macros in installed headers
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Florian Weimer <fw at deneb dot enyo dot de>
- Cc: Martin Sebor <msebor at gmail dot com>, <libc-alpha at sourceware dot org>
- Date: Mon, 25 Nov 2019 18:25:10 +0000
- Subject: Re: Variadic macros in installed headers
- Ironport-sdr: vd6t3Y4KTfDVBKbScrXHbTHE9SGzCAOJfQ3CkN276MXcz6YWBftkJTeBg8cPf7SA7zETz+c5r0 im4R0Sd2OFsDERNkDfJkuw+cca9/Acc39M1+9GKsPlrHmFPRZRf+Xfy7d1N1H/gIRS1R6OaN1U JM68Gi8xtdE8ovxkQxOVdl6RMAwvGQwHtM/Vfh3Saga5c11Dfydx9J9zgGwCSuvjxkmFYjqAWG wF+MugVdxeOGTRTy5Ym8uQPvZYUoaR5tQLCgGyYjXBQUxISAxu2+ofEcrj2mFjJASngu8XiPGS LEE=
- Ironport-sdr: j5SVmS68LZBLL2rUx6Qga8m80hS0Uiaf7tp6wxlcurEyRy1UcsJbblwgbmhy6yNqVJqAla2/pS vUQaEOPxGIUzQqDLDpZCo5eJ5zjRSU80XjWiwaeYQIq55Ssp6w5l/mI3vVwBL3yPgmR4keXFQH PqX6qa79PL1jsqnaPmClvTmCvrprVhiZ6aUiOA4CQaaOzqSmLSVTHc/uou6UgW2JuhfgEkyHDJ /azLlFQ283NLS95ZIQMARDG2DJVjkEiA0thSWm2Ji7bW+fw00i0zxBySELFJuekgFQObDrlIAm KsQ=
- References: <8736ee908k.fsf@mid.deneb.enyo.de> <a9461672-a2db-3c8f-69da-8d28ff807844@gmail.com> <87blt0bcyk.fsf@mid.deneb.enyo.de>
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