Jeffrey Cunningham wrote:
> On Mon Feb 26, 2007 at 02:35:16PM +0100, Josip Gracin wrote:
>> Could somebody please explain to me why the following expression
>> produces a compiler warning about unreachable code (the unreachable
>> being the expression which calls "sort"). I'm currently running SBCL
>> 188.8.131.52, but I've seen this behavior in various older versions.
>> (defun pro ()
>> (let* ((lst (list "ab" "cd" "af"))
>> (sorted-names (sort lst #'string<)))
>> (print sorted-names)))
> It works for me. SBCL 1.0.1 from source on 1/15/2007
I've just tried with 184.108.40.206 (the latest) and it's the same. However,
I've found something else. The problem occurs only if I proclaim the
(proclaim '(optimize (speed 0) (space 0)))
Any other values for speed and space will not generate the warning.
P.S. I have the following in my .sbclrc:
(proclaim '(optimize (debug 3) (speed 0) (space 0) (safety 3)))
But, debug and safety don't seem to affect the generation of the
warning. Only combination of speed and space.