From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS22989 209.51.188.0/24 X-Spam-Status: No, score=-4.1 required=3.0 tests=AWL,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,URIBL_BLOCKED shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 20DB81F463 for ; Thu, 12 Dec 2019 07:31:23 +0000 (UTC) Received: from localhost ([::1]:55522 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifIwT-0001gA-QR for normalperson@yhbt.net; Thu, 12 Dec 2019 02:31:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54121) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ifIwM-0001ew-B1 for bug-gnulib@gnu.org; Thu, 12 Dec 2019 02:31:15 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ifIwK-0008Da-W2 for bug-gnulib@gnu.org; Thu, 12 Dec 2019 02:31:14 -0500 Received: from freefriends.org ([96.88.95.60]:60342) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1ifIwK-0008Bt-OD for bug-gnulib@gnu.org; Thu, 12 Dec 2019 02:31:12 -0500 X-Envelope-From: arnold@skeeve.com Received: from freefriends.org (freefriends.org [96.88.95.60]) by freefriends.org (8.14.7/8.14.7) with ESMTP id xBC7V7FM031768 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 12 Dec 2019 00:31:07 -0700 Received: (from arnold@localhost) by freefriends.org (8.14.7/8.14.7/Submit) id xBC7V6gD031767; Thu, 12 Dec 2019 00:31:06 -0700 From: arnold@skeeve.com Message-Id: <201912120731.xBC7V6gD031767@freefriends.org> X-Authentication-Warning: frenzy.freefriends.org: arnold set sender to arnold@skeeve.com using -f Date: Thu, 12 Dec 2019 00:31:06 -0700 To: noritnk@kcn.ne.jp, eggert@cs.ucla.edu, 34951@debbugs.gnu.org Subject: Re: bug#34951: [PATCH] grep: a kwset matcher not work in a grep matcher References: <20190323080618.E6EB.27F6AC2D@kcn.ne.jp> <20190323114902.E6F6.27F6AC2D@kcn.ne.jp> <75091466-e105-c35c-fcd6-19ccca325914@cs.ucla.edu> In-Reply-To: <75091466-e105-c35c-fcd6-19ccca325914@cs.ucla.edu> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 96.88.95.60 X-BeenThere: bug-gnulib@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Gnulib discussion list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: arnold@skeeve.com, bug-gnulib@gnu.org Errors-To: bug-gnulib-bounces+normalperson=yhbt.net@gnu.org Sender: "bug-gnulib" Hi Paul. Paul Eggert wrote: > https://lists.gnu.org/r/bug-gnulib/2019-12/msg00058.html > https://lists.gnu.org/r/bug-gnulib/2019-12/msg00059.html Looking at this: | @@ -1733,11 +1733,11 @@ add_utf8_anychar (struct dfa *dfa) | /* f0-f7: 4-byte sequence. */ | CHARCLASS_INIT (0, 0, 0, 0, 0, 0, 0, 0xff0000) | }; | - const unsigned int n = sizeof (utf8_classes) / sizeof (utf8_classes[0]); | + int n = sizeof utf8_classes / sizeof *utf8_classes; Why are you throwing away const here? Other than this, I think internally too, I'd prefer that you 1,$s/ptrdiff_t/ssize_t/g (and fix any printf calls). It just feels like an abuse of the type, which is for representing differences between pointers, and not regular large signed integeers. However, I'm not going to insist about it internally, whereas I would object strongly to the use of ptrdiff_t in the API. Thanks! Arnold