On Wed, May 29, 2002 at 08:53:42AM -0500, William Harold Newman wrote:
> On Tue, May 21, 2002 at 01:40:44AM +0200, David Lichteblau wrote:
> > SBCL warns about lexical variables with names that look special (for
> > example, *FOO*). However IR1-CONVERT-LAMBDA calls NOTE-LEXICAL-BINDING
> > via MAKE-LAMBDA-VARS before declarations are processed, so warnings are
> > emitted about variables declared special locally.
> > * (let ((*foo* t))
> > (declare (special *foo*)))
> > ; in: LAMBDA NIL
> > ; (LET ((*FOO* T))
> > ; (DECLARE (SPECIAL *FOO*)))
> > ;
> > ; caught STYLE-WARNING:
> > ; using the lexical binding of the symbol *FOO*, not the
> > ; dynamic binding, even though the symbol name follows the usual naming
> > ; convention (names like *FOO*) for special variables
> > That's not right, is it? Can the premature check be removed, or are
> > there cases that IR1-CONVERT-LAMBDA-BODY doesn't catch?
> Now that I'm thinking of it, I'll probably at least comment out the
> offending NOTE-LEXICAL-BINDING (deleted in your patch below) since
> even if that causes the compiler to overlook some situations where it
> could issue a valid warning, that's better than sometimes issuing
> bogus warnings.
I didn't realize it when I read your message, but now that I've tried
it I realize that you meant that removing the bad check doesn't even
stop valid errors from being detected.
So thank you, I've applied your patch in sbcl-0.7.4.6, and bug 169
seems to be gone.
William Harold Newman <william.newman@...>
15:10:51 <Krystof> OK. I'm beginning to think that I should just get
over sbcl being approximately 50% slower than cmucl
15:11:49 <pmai> It's a law of nature. The so-called newman constant.
PGP key fingerprint 85 CE 1C BA 79 8D 51 8C B9 25 FB EE E0 C3 E5 7C