- (when (and (lambda-var-p var) (lambda-var-ignorep var))
- ;; (ANSI's specification for the IGNORE declaration requires
- ;; that this be a STYLE-WARNING, not a full WARNING.)
- (compiler-style-warning "reading an ignored variable: ~S" name))
+ (when (lambda-var-p var)
+ (let ((home (continuation-home-lambda-or-null start)))
+ (when home
+ (pushnew var (lambda-refers-to-vars home))))
+ (when (lambda-var-ignorep var)
+ ;; (ANSI's specification for the IGNORE declaration requires
+ ;; that this be a STYLE-WARNING, not a full WARNING.)
+ (compiler-style-warning "reading an ignored variable: ~S" name)))