emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Lisp reader bug


From: Andreas Schwab
Subject: Re: Lisp reader bug
Date: Fri, 04 Apr 2003 17:53:39 +0200
User-agent: Gnus/5.090017 (Oort Gnus v0.17) Emacs/21.3.50 (gnu/linux)

address@hidden (Kim F. Storm) writes:

|> Kenichi Handa <address@hidden> writes:
|> 
|> > Emacs of CVS HEAD has a bug in Lisp reader.  For instance,
|> > 
|> > (read (format "'%c" (decode-char 'ucs #x102)))
|> > => (quote )
|> > 
|> > I'm not sure, but perhaps this change is the cause.
|> > 
|> > 2003-02-18  Kim F. Storm  <address@hidden>
|> > 
|> >    * lread.c (read1): Fix last change.
|> >    "`" is not always special.  Allow "?" after a character constant.
|> > 
|> > This change adds codes something like this (total 4 places):
|> > 
|> >      || index ("\"';([#?", next_next_char)
|> > 
|> > but, it seems that `index' doesn't work well if the second
|> > arg is greater than 0xFF.  Actually, if I change such lines
|> > to:
|> > 
|> >      || (next_next_char < 0x100 && index ("\"';([#?", next_next_char))
|> > 
|> > the bug disappears.
|> > 
|> > Kim, could you take a look at this problem?
|> 
|> I'm not aware of that limitation in `index' (it is not documented),

The POSIX standard says that index shall be equivalen to strchr, and the C
standard says that strchr converts its second argument to char before the
comparison.

Andreas.

-- 
Andreas Schwab, SuSE Labs, address@hidden
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




reply via email to

[Prev in Thread] Current Thread [Next in Thread]