* Re: Expose 'array_length()' macro in <sys/cdefs.h> or <sys/param.h>
[not found] ` <alpine.DEB.2.21.2009301557590.5720@digraph.polyomino.org.uk>
@ 2020-09-30 20:39 ` Alejandro Colomar
0 siblings, 0 replies; only message in thread
From: Alejandro Colomar @ 2020-09-30 20:39 UTC (permalink / raw)
To: Joseph Myers
Cc: libc-alpha, libc-coord, libstdc++,
gcc, linux-kernel, linux-man, Jonathan Wakely, Florian Weimer,
Ville Voutilainen, enh, Rusty Russell, Alejandro Colomar
On 2020-09-30 17:58, Joseph Myers wrote:
> For some reason http://www.open-std.org/jtc1/sc22/wg14/www/docs/n2529.pdf
> doesn't seem to have reached the agenda of a WG14 meeting yet, but adding
> a language feature like that to the standard would be another approach.
>
Hi Joseph,
Yes, that would be great!
I hope they add that to the language. When/if that happens, nitems()
could be `#define nitems(arr) _Lengthof(arr)` for std >= c2x.
In the meantime, I would add this macro to libc.
Maybe gcc could add such a great feature as an extension even before the
standard does...
Too many wishes :)
BTW, I sent a PATCH v4 that I should've sent --in-reply-to PATCH v3 in
this thread (but I forgot to do so); I'll link to it here:
https://sourceware.org/pipermail/libc-alpha/2020-September/117986.html
Thanks,
Alex
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-30 20:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <946e9377-0558-3adf-3eb9-38c507afe2d0@gmail.com>
[not found] ` <alpine.DEB.2.21.2009301557590.5720@digraph.polyomino.org.uk>
2020-09-30 20:39 ` Expose 'array_length()' macro in <sys/cdefs.h> or <sys/param.h> Alejandro Colomar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).