Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date: Tue, 22 Sep 2020 19:53:48 +0300
From: Ville Voutilainen <>
To: Jonathan Wakely <>
Cc: Rich Felker <>, Florian Weimer <>,, 
	"libstdc++" <>, Libc-alpha <>,
Subject: Re: Re: Expose 'array_length()' macro in <sys/cdefs.h>
 or <sys/param.h>

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 *x)?
> IMHO no.

While it's anciently stupid that that trick needs to be learned by
every programmer instead of having
something straightforward readily available, I can't become a fan of
this direction when it introduces
lowercase macros that might clash with something existing or something
that other people will want to write.
And yes, I know, we can't do any better in C, due to array decay.

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.