[Openmcl-devel] Loop in function that should fail with type error

Renzo Orsini orsini at unive.it
Thu Jul 9 15:33:10 PDT 2015


The following (absurd) function:

(defun wrong(l)
   (if (eq nil l) 
       l 
      (- (car (cdr l)) (car l)))
  (wrong (cdr l)))

if called as in: (wrong ‘(10 5)) should terminate with an error due to the application of the operator “-“ to NIL (this for instance happen in SBCL). But when I try it in CCL it seems to enter in an infinite loop. Is this an error? Some effect of the compiler optimization?

Should I open a ticket?

Thanks,

Renzo


-- 
"Nota automatica aggiunta dal sistema di posta.
Destina il 5 per mille per sostenere con borse di studio gli studenti 
meritevoli di Ca' Foscari.
E' un atto volontario, non costa nulla e non sostituisce l'8 per mille.
Scegli Ca' Foscari: codice fiscale 80007720271
Please note that the above message is addressed only to individuals filing 
Italian income tax returns."



More information about the Openmcl-devel mailing list