Re: Expose 'array_length()' macro in or

2020-09-30 Thread Alejandro Colomar via Gcc
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

Re: [libc-coord] Re: Expose 'array_length()' macro in or

2020-09-22 Thread Ville Voutilainen via Gcc
On Tue, 22 Sep 2020 at 19:46, Jonathan Wakely via Libstdc++ wrote: > > On 22/09/20 12:25 -0400, Rich Felker wrote: > >Is there really a reason to want a nonstandard macro like this to do > >something that's already trivial to do in the base language and has a > >standard idiom (sizeof x / sizeof *

Re: [libc-coord] Re: Expose 'array_length()' macro in or

2020-09-22 Thread Jonathan Wakely via Gcc
On 22/09/20 12:25 -0400, Rich Felker wrote: Is there really a reason to want a nonstandard macro like this to do something that's already trivial to do in the base language and has a standard idiom (sizeof x / sizeof *x)? IMHO no.

Re: [libc-coord] Re: Expose 'array_length()' macro in or

2020-09-22 Thread Rich Felker
On Mon, Sep 21, 2020 at 02:47:51PM +0200, Alejandro Colomar wrote: > [[ CC += libc-coord at lists.openwall.com ]] I missed the beginning of this so perhaps it's already been discussed, but I don't see how cdefs.h is a remotely reasonable place for this. cdefs.h is included by all glibc headers and

Re: [libc-coord] Re: Expose 'array_length()' macro in or

2020-09-21 Thread enh via Gcc
Why would C++ programmers need this given https://en.cppreference.com/w/cpp/iterator/size ? On Mon, Sep 21, 2020, 05:54 Alejandro Colomar wrote: > [[ CC += libc-coord at lists.openwall.com ]] > > On 2020-09-21 12:33, Florian Weimer wrote: > > * Alejandro Colomar: > > > >> [[ > >> CC += libc-coor

Re: Expose 'array_length()' macro in or

2020-09-21 Thread Jonathan Wakely via Gcc
On 21/09/20 12:33 +0200, Florian Weimer via Libstdc++ wrote: * Alejandro Colomar: [[ CC += libc-co...@sourceware.org CC += gcc@gcc.gnu.org CC += libstd...@gcc.gnu.org ]] Hi Florian, On 2020-09-21 10:38, Florian Weimer wrote: * Alejandro Colomar via Libc-alpha: I'd like to propose exposing

Re: Expose 'array_length()' macro in or

2020-09-21 Thread Alejandro Colomar via Gcc
[[ CC += libc-coord at lists.openwall.com ]] On 2020-09-21 12:33, Florian Weimer wrote: * Alejandro Colomar: [[ CC += libc-coord at sourceware.org CC += gcc at gcc.gnu.org CC += libstdc++ at gcc.gnu.org ]] Hi Florian, On 2020-09-21 10:38, Florian Weimer wrote: * Alejandro Colomar via Libc-a

Re: Expose 'array_length()' macro in or

2020-09-21 Thread Florian Weimer via Gcc
* Alejandro Colomar: > [[ > CC += libc-co...@sourceware.org > CC += gcc@gcc.gnu.org > CC += libstd...@gcc.gnu.org > ]] > > Hi Florian, > > On 2020-09-21 10:38, Florian Weimer wrote: >> * Alejandro Colomar via Libc-alpha: >> >>> I'd like to propose exposing the macro 'array_length()' as defined in

Re: Expose 'array_length()' macro in or

2020-09-21 Thread Alejandro Colomar via Gcc
[[ CC += libc-co...@sourceware.org CC += gcc@gcc.gnu.org CC += libstd...@gcc.gnu.org ]] Hi Florian, On 2020-09-21 10:38, Florian Weimer wrote: > * Alejandro Colomar via Libc-alpha: > >> I'd like to propose exposing the macro 'array_length()' as defined in >> 'include/array_length.h' to the user.