GNU bug report logs - #16581
suggested code simplification in dfa.c

Previous Next

Package: grep;

Reported by: Aharon Robbins <arnold <at> skeeve.com>

Date: Tue, 28 Jan 2014 20:12:01 UTC

Severity: normal

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

Bug is archived. No further changes may be made.

Full log


Message #11 received at 16581 <at> debbugs.gnu.org (full text, mbox):

From: Aharon Robbins <arnold <at> skeeve.com>
To: eggert <at> cs.ucla.edu, arnold <at> skeeve.com, 16581 <at> debbugs.gnu.org
Subject: Re: bug#16581: suggested code simplification in dfa.c
Date: Wed, 29 Jan 2014 04:50:47 +0200
Hi Paul.

I skimmed the patch.

All that exclusive-ORing looks a little scary to me. Will that work,
for example, on EBCDIC systems?  Gawk supports z/OS - a POSIX enviornment
on top of OS/390.  Will it work on systems using some of the older
far Eastern, non-Unicode locales?

What is it even doing?  What do you expect to get from

	wc ^ towlower(wc) ^ towupper(wc)

?

I'm worried that you've embedded a deep assumption about how characters
are encoded and how upper and lower case relate to each other in
every possible character set we might be called upon to handle, and
it feels really risky to me.

I think I'd be happier if you did the simplification in smaller, more
comprehensible, steps.

My two cents, of course. :-)

Thanks,

Arnold




This bug report was last modified 11 years and 79 days ago.

Previous Next


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