Steel Bank Common Lisp

unused variable style-warning from LOOP WITH NIL

Reported by 3b on 2010-08-05
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Low
Unassigned

Bug Description

(loop with nil = 1 repeat 1)

produces

; in: LAMBDA NIL
; (LET ((#:LOOP-IGNORE-1217 1))
; (LET ((#:LOOP-REPEAT-1218 (CEILING 1)))
; (DECLARE (TYPE INTEGER #:LOOP-REPEAT-1218))
; (SB-LOOP::LOOP-BODY NIL
; ((IF #
; #
; #))
; NIL
; ((IF #
; #
; #))
; NIL)))
;
; caught STYLE-WARNING:
; The variable #:LOOP-IGNORE-1217 is defined but never used.

Changed in sbcl:
importance: Undecided → Low
status: New → Triaged
Changed in sbcl:
assignee: nobody → Roman Marynchak (roman-marynchak)
status: Triaged → In Progress

The simple solution is to always mark the declared LOOP-IGNORE-NNN variable with IGNORE. As for now I cannot imagine any issues with this approach, but I may be wrong. Please review.

tags: added: review

The better version of the patch, and the regression test.

Changed in sbcl:
assignee: Roman Marynchak (roman-marynchak) → Nikodemus Siivola (nikodemus)
Nikodemus Siivola (nikodemus) wrote :

Thank you. In 1.0.43.25.

I've been going on so much about commit messages that I wrote one for this. :)

Changed in sbcl:
assignee: Nikodemus Siivola (nikodemus) → nobody
status: In Progress → Fix Committed
tags: removed: review
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers