guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Reporting unused local variables


From: Ludovic Courtès
Subject: Re: Reporting unused local variables
Date: Fri, 31 Jul 2009 01:30:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.50 (gnu/linux)

Hello!

I just committed the changes summarized below that add
`-W unused-variable' to "guile-tools compile".

It appears to work well, but only has approximate source location info
for `define-macro' expansions, for instance (but that's another story).

Daniel: could you try it with the Elisp front-end and report back?

I'm planning to add warnings for possibly unbound variables, and global
bindings unused in the current module and not exported (and eventually
anything Guile-Lint supported).

Thanks,
Ludo'.

  commit 4b856371b3e85cd82f6d637f72bc610d0158b5de
  Author: Ludovic Courtès <address@hidden>
  Date:   Fri Jul 31 00:42:58 2009 +0200

      Add unused variable analysis in the tree-il->glil compiler.

      * module/language/tree-il/analyze.scm (<binding-info>): New record type.
        (report-unused-variables): New procedure.

      * module/language/tree-il/compile-glil.scm (%warning-passes): New
        variable.
        (compile-glil): Honor `#:warnings' from OPTS.

      * test-suite/tests/tree-il.test (call-with-warnings): New procedure.
        (%opts-w-unused): New variable.
        ("warnings"): New test prefix.

  commit 2e4c3227ce1374dd53abd3c7c5797cc64329de91
  Author: Ludovic Courtès <address@hidden>
  Date:   Fri Jul 31 00:06:59 2009 +0200

      Add `(system base message)', a simple warning framework.

      * module/Makefile.am (SOURCES): Add `system/base/message.scm'.

      * module/scripts/compile.scm (%options): Add `--warn'.
        (parse-args): Update default value for `warnings'.
        (show-warning-help): New procedure.
        (compile)[compile-opts]: Add `#:warnings'.
        Update help message.

      * module/system/base/compile.scm (compile): Sanity-check the requested
        warnings.

      * module/system/base/message.scm: New file.

  commit f4aa0f104b3347c21093b837046022fb7bb6a2ff
  Author: Ludovic Courtès <address@hidden>
  Date:   Thu Jul 30 00:48:04 2009 +0200

      Add `tree-il-fold', a purely functional iterator on `tree-il'.

      * module/language/tree-il.scm (tree-il-fold): New procedure.

      * test-suite/tests/tree-il.test ("tree-il-fold"): New test prefix.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]