[tbnl-devel] Re: TBNL/SBCL 0.9.16 problems

Juho Snellman jsnell at iki.fi
Tue Sep 5 17:37:44 UTC 2006

<edi at agharta.de> wrote:
> Hmm, SBCL's error message is not very helpful, I'm afraid.  My /guess/
> is that it looks at the macro-expansion of REGISTER-GROUPS-BIND and
> infers that NAME or INDEX-STRING could in theory be NIL and thus
> aren't valid arguments for STRING= or PARSE-INTEGER.  However, in this
> particular case it is perfectly clear that his won't happen - the body
> of the macro will only be executed if there's a match; and if there's
> a match, then all registers will match as well.
> I'd propose that you ask the SBCL experts if my guess is right and if
> so how one can convince the compiler to be a bit less overzealous.

That guess is right. A couple of ways to decrease the zeal:

  * Just muffle the warning by adding the following declaration at the
    start of the function:

    #+sbcl (declare (sb-ext:muffle-conditions warning))
  * Ensure that the compiler also knows that it really can't happen by
     (when (string= name parameter-name)
       (parse-integer index-string))
     (when (and (string= name parameter-name)
       (parse-integer index-string))

Juho Snellman

More information about the Tbnl-devel mailing list