Variables declared ignorable no longer produce a warning when removed from LET/LET...
authorJuan Jose Garcia Ripoll <jjgarcia@jjgr-2.local>
Sun, 7 Feb 2010 00:21:26 +0000 (01:21 +0100)
committerJuan Jose Garcia Ripoll <jjgarcia@jjgr-2.local>
Sun, 7 Feb 2010 00:21:26 +0000 (01:21 +0100)
src/CHANGELOG
src/cmp/cmplet.lsp

index e9834be..432a559 100755 (executable)
@@ -23,6 +23,9 @@ ECL 10.1.1:
  - The interrupt servicing thread must explicitely include the interrupt signal
    among the ones it captures. Otherwise it will never be interrupted itself.
 
+ - No longer style warnings about removal of a variable when this variable was
+   previously declared as ignorable.
+
 * Visible changes:
 
  - Significant speed up in access to hash tables of up to 30% by writing
index a8c5cbb..211ddf4 100644 (file)
@@ -88,7 +88,8 @@
        (when (and (= 0 (var-ref var))
                   (not (member (var-kind var) '(special global)))
                   (not (form-causes-side-effect form)))
-         (cmpnote "Removing unused variable ~A" (var-name var))
+          (unless (var-ignorable var)
+            (cmpnote "Removing unused variable ~A" (var-name var)))
          (go continue))
        ;;  (let ((v1 e1) (v2 e2) (v3 e3)) (expr e4 v2 e5))
        ;;  can become
        (when (and (= 0 (var-ref var))
                   (not (member (var-kind var) '(SPECIAL GLOBAL)))
                   (not (form-causes-side-effect form)))
-         (cmpnote "Removing unused variable ~A" (var-name var))
+          (unless (var-ignorable var)
+            (cmpnote "Removing unused variable ~A" (var-name var)))
          (go continue))
        ;;  (let* ((v1 e1) (v2 e2) (v3 e3)) (expr e4 v2 e5))
        ;;  can become