0.8.10.18:
authorChristophe Rhodes <csr21@cam.ac.uk>
Tue, 11 May 2004 07:31:36 +0000 (07:31 +0000)
committerChristophe Rhodes <csr21@cam.ac.uk>
Tue, 11 May 2004 07:31:36 +0000 (07:31 +0000)
Merge patch for bogus LOOP warning (Nikodemus Siivola sbcl-devel
2004-05-01)
... and write a test case

NEWS
src/code/loop.lisp
tests/loop.pure.lisp
version.lisp-expr

diff --git a/NEWS b/NEWS
index 1ded01c..36f82cf 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -2420,8 +2420,11 @@ changes in sbcl-0.8.11 relative to sbcl-0.8.10:
     type.
   * fixed bug: SET-PPRINT-DISPATCH does not immediately resolve
     function name. (thanks to Nikodemus Siivola)
-  * fixed bug:: compile-time format string checker failed on
+  * fixed bug: compile-time format string checker failed on
     non-closed ~{.  (reported by Thomas F Burdick)
+  * fixed bug: as reported by Kalle Olavi Niemitalo on #lisp IRC,
+    don't warn on legal loop code involving more than one aggregate
+    boolean.  (thanks to Nikodemus Siivola)
   * optimization: rearranged the expansion of various defining macros
     so that each expands into only one top-level form in a
     :LOAD-TOPLEVEL context; this appears to decrease fasl sizes by
index acabbf6..674c701 100644 (file)
@@ -479,8 +479,8 @@ code to be loaded.
 (defvar *loop-after-epilogue*)
 
 ;;; the "culprit" responsible for supplying a final value from the
-;;; loop. This is so LOOP-EMIT-FINAL-VALUE can moan about multiple
-;;; return values being supplied.
+;;; loop. This is so LOOP-DISALLOW-AGGREGATE-BOOLEANS can moan about
+;;; disallowed anonymous collections.
 (defvar *loop-final-value-culprit*)
 
 ;;; If this is true, we are in some branch of a conditional. Some
@@ -908,10 +908,6 @@ code to be loaded.
 (defun loop-emit-final-value (&optional (form nil form-supplied-p))
   (when form-supplied-p
     (push (loop-construct-return form) *loop-after-epilogue*))
-  (when *loop-final-value-culprit*
-    (loop-warn "The LOOP clause is providing a value for the iteration;~@
-               however, one was already established by a ~S clause."
-              *loop-final-value-culprit*))
   (setq *loop-final-value-culprit* (car *loop-source-context*)))
 
 (defun loop-disallow-conditional (&optional kwd)
index febf5a7..408d18b 100644 (file)
   (let ((x 2d0))
     (loop for d of-type double-float downfrom 10d0 to 0d0 by x collect d))
   '(10d0 8d0 6d0 4d0 2d0 0d0)))
+
+(let ((fn (handler-case
+             (compile nil '(lambda ()
+                            (declare (special x y))
+                            (loop thereis (pop x) thereis (pop y))))
+           (warning (c) (error "Warned: ~S" c)))))
+  (let ((x (list nil nil 1))
+       (y (list nil 2 nil)))
+    (declare (special x y))
+    (assert (= (funcall fn) 2))))
index ce981eb..3dbc98f 100644 (file)
@@ -17,4 +17,4 @@
 ;;; checkins which aren't released. (And occasionally for internal
 ;;; versions, especially for internal versions off the main CVS
 ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".)
-"0.8.10.17"
+"0.8.10.18"