From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qv1-xf42.google.com (mail-qv1-xf42.google.com [IPv6:2607:f8b0:4864:20::f42]) by sourceware.org (Postfix) with ESMTPS id 13A14383F878 for ; Tue, 22 Sep 2020 16:54:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 13A14383F878 Received: by mail-qv1-xf42.google.com with SMTP id q10so9885833qvs.1 for ; Tue, 22 Sep 2020 09:54:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=/aK0CVyIHAEqnm/wXtlalRdID2VvBYwkT+0gn2Q9gj4=; b=of1XxJko5sBDs0a1LkfH3KsB+NfbU8his1lrL8xXOH0fkgiExTlpREq94NEYzYjxdF S/Jy477BKM1uSNFSGPMivpIhkbrPGB40in0WUoEzcRKmdBji4EMq71ijIXN5hv0/SrjG 7gK/oCHKzohepTR1PIB46p6EAyTEkYKm10AWpaG5IaY6ivuTmuNj8xezY9bhIX4m/ibe 64rqgw71IwCaf9p081+CYrD+XmvF6XZ1YqrT1tmhEJT1z+XEUe1skUZaL6Pbn5PNEhQf zk3/fFwq121O68udBxgUa8rY5UfrpYPp0IQN0416C3AypiZxofLn1g7qo3oTZxFGLXnI 9SWg== X-Gm-Message-State: AOAM5309L1n9Vxii2fHxzbXCikyMoM/lXdubVfV/3N84X6912EFoNi+M KyPK14bsZbfgBtO2zO4cVOSNH693oxRxePORXW9pToMt X-Google-Smtp-Source: ABdhPJwWgjxPuTDf7liqcL75rbGgnzZX0skseJX8aB4frmWPEztegt0dbXyp/Tbv3vEt1fQtEYzgpB5dF5UO6Yk2qIM= X-Received: by 2002:a0c:b2ce:: with SMTP id d14mr6967532qvf.40.1600793639689; Tue, 22 Sep 2020 09:53:59 -0700 (PDT) MIME-Version: 1.0 References: <946e9377-0558-3adf-3eb9-38c507afe2d0@gmail.com> <874knr8qyl.fsf@oldenburg2.str.redhat.com> <875z875si2.fsf@oldenburg2.str.redhat.com> <20200922162549.GH3265@brightrain.aerifal.cx> <20200922164456.GY6061@redhat.com> In-Reply-To: <20200922164456.GY6061@redhat.com> From: Ville Voutilainen Date: Tue, 22 Sep 2020 19:53:48 +0300 Message-ID: Subject: Re: [libc-coord] Re: Expose 'array_length()' macro in or To: Jonathan Wakely Cc: Rich Felker , Florian Weimer , gcc@gcc.gnu.org, "libstdc++" , Libc-alpha , libc-coord@lists.openwall.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.8 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Sep 2020 16:54:01 -0000 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.