Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is "Unused variable G**** in anonymous function"?

I don't know if it is implementation dependent. Just in case it matters, I'm using Corman Lisp 3.0

When I do something like this:

(loop for v being the hash-values of *my-hash-table*
  when (> v 1) sum v)

I get two warnings:

;;; Warning: Unused variable G9063 in anonymous function
;;; Warning: Unused variable G9062 in anonymous function

With the number of G changing every time.

The result is correct though. What do they mean? Why do they appear? I suppose there might be some kind of loop syntax misuse, which leads to these warnings, but I fail to see it.

like image 874
akalenuk Avatar asked Aug 14 '13 10:08

akalenuk


1 Answers

Corman Lisp hasn't been updated for years. The G* unused variables are probably gensyms in the macro expansion of loop. Try

(macroexpand '(loop ...))

to see what these variables store.

like image 130
acelent Avatar answered Oct 30 '22 00:10

acelent