From 85b379e23585ff0577fca448def05fc40f0a1073 Mon Sep 17 00:00:00 2001 From: Juan Jose Garcia Ripoll Date: Sun, 7 Feb 2010 01:21:26 +0100 Subject: [PATCH] Variables declared ignorable no longer produce a warning when removed from LET/LET* forms. --- src/CHANGELOG | 3 +++ src/cmp/cmplet.lsp | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/CHANGELOG b/src/CHANGELOG index e9834bedb..432a559f5 100755 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -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 diff --git a/src/cmp/cmplet.lsp b/src/cmp/cmplet.lsp index a8c5cbbeb..211ddf4d1 100644 --- a/src/cmp/cmplet.lsp +++ b/src/cmp/cmplet.lsp @@ -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 @@ -322,7 +323,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