unused variable style warning from LOOP .. MINIMIZE .. MINIMIZE

Bug #613876 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 repeat 5 minimize 1 minimize 1)

produces

; in: LAMBDA NIL
; (SB-LOOP::WITH-MINIMAX-VALUE #S(SB-LOOP::LOOP-MINIMAX
; :ANSWER-VARIABLE #:LOOP-MAXMIN-1248
; :TYPE REAL
; :TEMP-VARIABLE #:LOOP-MAXMIN-TEMP-1249
; :FLAG-VARIABLE #:LOOP-MAXMIN-FLAG-1250
; :OPERATIONS (MIN)
; :INFINITY-DATA NIL)
; (SB-LOOP::WITH-MINIMAX-VALUE #S(SB-LOOP::LOOP-MINIMAX
; :ANSWER-VARIABLE #:LOOP-MAXMIN-1248
; :TYPE REAL
; :TEMP-VARIABLE #:LOOP-MAXMIN-TEMP-1249
; :FLAG-VARIABLE #:LOOP-MAXMIN-FLAG-1250
; :OPERATIONS (MIN)
; :INFINITY-DATA NIL)
; (SB-LOOP::LOOP-BODY NIL
; ((IF #
; #
; #))
; ((SB-LOOP::LOOP-ACCUMULATE-MINIMAX-VALUE # MIN 1)
; (SB-LOOP::LOOP-ACCUMULATE-MINIMAX-VALUE # MIN 2))
; ((IF #
; #
; #))
; ((RETURN-FROM NIL #:LOOP-MAXMIN-1248)))))
; ==>
; (LET ((#:LOOP-MAXMIN-1248 0)
; (#:LOOP-MAXMIN-TEMP-1249 0)
; (#:LOOP-MAXMIN-FLAG-1250 NIL))
; (DECLARE (TYPE REAL #:LOOP-MAXMIN-1248 #:LOOP-MAXMIN-TEMP-1249))
; (SB-LOOP::WITH-MINIMAX-VALUE #S(SB-LOOP::LOOP-MINIMAX
; :ANSWER-VARIABLE #:LOOP-MAXMIN-1248
; :TYPE REAL
; :TEMP-VARIABLE #:LOOP-MAXMIN-TEMP-1249
; :FLAG-VARIABLE #:LOOP-MAXMIN-FLAG-1250
; :OPERATIONS (MIN)
; :INFINITY-DATA NIL)
; (SB-LOOP::LOOP-BODY NIL
; ((IF #
; #
; #))
; ((SB-LOOP::LOOP-ACCUMULATE-MINIMAX-VALUE # MIN 1)
; (SB-LOOP::LOOP-ACCUMULATE-MINIMAX-VALUE # MIN 2))
; ((IF #
; #
; #))
; ((RETURN-FROM NIL #:LOOP-MAXMIN-1248)))))
;
; caught STYLE-WARNING:
; The variable #:LOOP-MAXMIN-1248 is defined but never used.
;
; caught STYLE-WARNING:
; The variable #:LOOP-MAXMIN-TEMP-1249 is defined but never used.
;
; caught STYLE-WARNING:
; The variable #:LOOP-MAXMIN-FLAG-1250 is defined but never used.
;
; compilation unit finished
; caught 3 STYLE-WARNING conditions

(similarly with MAXIMIZE, or for more realistic examples, for example minimizing conditionally, or with more complicated expressions)

but seems to work properly.

expected no style warnings

Changed in sbcl:
status: New → Triaged
importance: Undecided → Low
Stas Boukarev (stassats) wrote :

In 6e082927c1f19a75b8d73a796a9ebc28adae3792.

Changed in sbcl:
status: Triaged → Fix Committed
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