diff options
author | Andy Wingo <wingo@pobox.com> | 2021-01-07 10:15:32 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2021-01-07 10:26:33 +0100 |
commit | 9d5978a756008b536fbb13e6de67ae0b4741b161 (patch) | |
tree | e658ccc1991cc8745eee59b0a1ecb1b7e1793a8a /doc/ref/api-evaluation.texi | |
parent | 64c89458e6b4fcc834ed86bf0d6606a5a1044e7e (diff) | |
download | guile-9d5978a756008b536fbb13e6de67ae0b4741b161.tar.gz |
New warnings: -Wuse-before-definition, -Wnon-idempotent-definition
* module/ice-9/boot-9.scm (%auto-compilation-options): Add
use-before-definition and non-idempotent-definition.
* module/language/tree-il/analyze.scm (<use-before-def-info>): New
analysis info.
(make-use-before-definition-analysis): New function.
(goops-toplevel-definition): Move down.
(unbound-variable-analysis, macro-use-before-definition): Remove, as
they are subsumed by use-before-def. There are some deprecated
bindings though.
(make-analyzer): Rework to allow for use-before-def analysis to handle
multiple
* module/system/base/message.scm (%warning-types): Add handlers for the
new warning types.
* test-suite/tests/tree-il.test: Add tests.
* doc/ref/api-evaluation.texi (Compilation): Update.
Diffstat (limited to 'doc/ref/api-evaluation.texi')
-rw-r--r-- | doc/ref/api-evaluation.texi | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/doc/ref/api-evaluation.texi b/doc/ref/api-evaluation.texi index b4a287de5..5e1204c0d 100644 --- a/doc/ref/api-evaluation.texi +++ b/doc/ref/api-evaluation.texi @@ -1,7 +1,7 @@ @c -*-texinfo-*- @c This is part of the GNU Guile Reference Manual. @c Copyright (C) 1996, 1997, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009, -@c 2010, 2011, 2012, 2013, 2014, 2020 Free Software Foundation, Inc. +@c 2010, 2011, 2012, 2013, 2014, 2020, 2021 Free Software Foundation, Inc. @c See the file guile.texi for copying conditions. @node Read/Load/Eval/Compile @@ -666,13 +666,9 @@ For example, to compile R6RS code, you might want to pass @command{-x @item -W @var{warning} @itemx --warn=@var{warning} @cindex warnings, compiler -Emit warnings of type @var{warning}; use @code{--warn=help} for a list -of available warnings and their description. Currently recognized -warnings include @code{unused-variable}, @code{unused-toplevel}, -@code{shadowed-toplevel}, @code{unbound-variable}, -@code{macro-use-before-definition}, -@code{arity-mismatch}, @code{format}, -@code{duplicate-case-datum}, and @code{bad-case-datum}. +Enable specific warning passes; use @code{-Whelp} for a list of +available options. The default is @code{-W1}, which enables a number of +common warnings. Pass @code{-W0} to disable all warnings. @item -O @var{opt} @itemx --optimize=@var{opt} |