[armedbear-ticket] [armedbear] #23: RETURN handled differently in interpreted and compiled code

armedbear armedbear-devel at common-lisp.net
Wed Nov 5 21:25:40 UTC 2008


#23: RETURN handled differently in interpreted and compiled code
------------------------+---------------------------------------------------
 Reporter:  ehuelsmann  |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  major       |   Milestone:          
Component:  component1  |     Version:          
 Keywords:              |  
------------------------+---------------------------------------------------
 Robert Dodier writes:

 See below for foobar.lisp.

 Interpreted:
 (foobar)
  =>
 HELLO 1
 NIL


 Compiled:
 (foobar)
  =>
 HELLO 1
 HELLO 2
 T


 I'm no expert on the CL spec so I don't know which is correct.
 But I think Maxima expects the behavior shown by interpreted code here.

 Thanks for your attention to this.

 Robert Dodier

 PS.
 $ cat foobar.lisp
 (defun blurf () nil)

 (defun foobar ()
  (prog (x y z)
        (declare (ignore x y z))
        ((lambda (a b)
           (declare (ignore a b))
           (format t "HELLO 1~%")
           (cond ((not (blurf)) (return nil))))
         nil nil)
        (format t "HELLO 2~%")
        (return t)))

-- 
Ticket URL: <http://127.0.0.1:8000/armedbear/ticket/23>
armedbear <http://common-lisp.net/project/armedbear>
armedbear


More information about the armedbear-ticket mailing list