Is it a bug?

Zbyszek Jurkiewicz zbyszek at mimuw.edu.pl
Thu Mar 25 13:54:38 CET 2010


* (macroexpand-1 '(dotimes (i n)
         (if (> (* i i) n) (return i))))


(DO ((#:CTR-1710 0 (1+ #:CTR-1710))
      (#:G1711 N))
     ((>= #:CTR-1710 #:G1711)
      (LET ((I #:CTR-1710))
        I
        NIL))
   (DECLARE (TYPE UNSIGNED-BYTE #:CTR-1710))
                  ^^^^^^^^^^^^^
   (LET ((I #:CTR-1710))
     I
     (TAGBODY (IF (> (* I I) N) (RETURN I)))))
T

* (macroexpand '(dotimes (i n)
         (if (> (* i i) n) (return i))))

(BLOCK NIL
   (LET ((#:CTR-1712 0) (#:G1713 N))
     (DECLARE (TYPE UNSIGNED-BYTE #:CTR-1712))
                    ^^^^^^^^^^^^^
     (TAGBODY
       (GO #:G1715)
      #:G1714
       (LET ((I #:CTR-1712))
         I
         (TAGBODY (IF (> (* I I) N) (RETURN I))))
       (PSETQ #:CTR-1712 (1+ #:CTR-1712))
      #:G1715
       (UNLESS (>= #:CTR-1712 #:G1713)
         (GO #:G1714))
       (RETURN-FROM NIL
         (PROGN
           (LET ((I #:CTR-1712))
             I
             NIL))))))
T

CMU Common Lisp 19f (19F), running on katastrofa
With core: /usr/local/lib/cmucl/lib/lisp-sse2.core
Dumped on: Wed, 2009-03-11 01:52:06+01:00 on lorien2

Regards

ZJ



More information about the cmucl-help mailing list