GNU bug report logs - #34951
[PATCH] grep: a kwset matcher not work in a grep matcher

Previous Next

Package: grep;

Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Date: Sat, 23 Mar 2019 02:30:02 UTC

Severity: normal

Tags: patch

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: arnold <at> skeeve.com
To: noritnk <at> kcn.ne.jp, eggert <at> cs.ucla.edu, arnold <at> skeeve.com, 34951 <at> debbugs.gnu.org
Cc: bug-gnulib <at> gnu.org
Subject: bug#34951: [PATCH] grep: a kwset matcher not work in a grep matcher
Date: Fri, 13 Dec 2019 01:09:56 -0700
Hi Paul.

Paul Eggert <eggert <at> cs.ucla.edu> wrote:

> On 12/11/19 11:31 PM, arnold <at> skeeve.com wrote:
>
> > 	1,$s/ptrdiff_t/ssize_t/g
>
> ssize_t can be narrower than ptrdiff_t, so it's not a good type to use 
> for this notion. Its original motivation was "the type that 'read' 
> returns", and on systems where 'read' can return at most INT_MAX, 
> ssize_t can be 32 bits even if size_t is 64 bits.

In practice, how many system are there where ssize_t is 32 bits and size_t
is 64? If that number is <= 5 then I wouldn't worry about using ssize_t.

In any case, as I said, I can live with ptrdiff_t in the implementation,
even though I don't like it that much.  (A nice block comment at the
top of dfa.c explaining why ptrdiff_t is used would be appropriate.)

But I really don't want ptrdiff_t in the API.

Thanks,

Arnold

Thanks,

Arnold




This bug report was last modified 5 years and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.