Hello, The attached patch is an attempt to add unused variable reporting to the compiler, at the GLIL->assembly step. It was quite simple to implement here, and it should work with all front-ends (Scheme, ECMAScript, etc.), which is nice. Example: --8<---------------cut here---------------start------------->8--- scheme@(guile-user)> (lambda () (let ((x 2)) x)) $1 = #:1:0 ()> scheme@(guile-user)> (lambda () (let ((x 2)) 'something-else)) :3:11: variable `x' never referenced $2 = #:2:0 ()> --8<---------------cut here---------------end--------------->8--- It works as well on actual programs such as the compiler itself, but leads to a stack overflow on files with lots of unused variables, such as `language/tree-il/compile-glil.scm', although `analyze-program' is tail-recursive AFAICS (ideas welcome). Also, it's annoying because it reports unused bindings introduced by `record-case', and there are lots of them in the compiler. Is this the right place and the right way to do such things? Comments? Thanks, Ludo'.