From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id 0FEA339F6ECF for ; Fri, 25 Sep 2020 17:43:00 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 0FEA339F6ECF Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-553-DYD928vjMa2JiSqYo-8Wbg-1; Fri, 25 Sep 2020 13:42:55 -0400 X-MC-Unique: DYD928vjMa2JiSqYo-8Wbg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E68E5425E6; Fri, 25 Sep 2020 17:42:53 +0000 (UTC) Received: from localhost (unknown [10.33.36.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 61FB25D9DC; Fri, 25 Sep 2020 17:42:53 +0000 (UTC) Date: Fri, 25 Sep 2020 18:42:52 +0100 From: Jonathan Wakely To: Alejandro Colomar Cc: fweimer@redhat.com, linux-man@vger.kernel.org, libc-alpha@sourceware.org, gcc@gcc.gnu.org, rusty@rustcorp.com.au, linux-kernel@vger.kernel.org, libstdc++@gcc.gnu.org, libc-coord@lists.openwall.com, enh@google.com Subject: Re: [PATCH v2] : Add nitems() and snitems() macros Message-ID: <20200925174252.GO6061@redhat.com> References: <20200922145844.31867-1-colomar.6.4.3@gmail.com> <20200925132000.235033-1-colomar.6.4.3@gmail.com> <20200925144822.GM6061@redhat.com> <22c110fe-4c92-e5e6-dc35-dbf00a97cfa2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <22c110fe-4c92-e5e6-dc35-dbf00a97cfa2@gmail.com> X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Spam-Status: No, score=-9.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H5, RCVD_IN_MSPIKE_WL, 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: Fri, 25 Sep 2020 17:43:01 -0000 On 25/09/20 18:30 +0200, Alejandro Colomar via Libstdc++ wrote: >I have a similar number of ARRAY_SIZE() and ARRAY_SSIZE(). >I could have '#define snitems(arr) ((ptrdiff_t)nitems(arr))' in my projects, >but is it really necessary? The barrier for adding something to glibc headers should be a LOT higher than "I could [do it in my own code], but is it really necessary?" >Did I convince you? :-) No.