]> git.saurik.com Git - bison.git/commit - doc/bison.texi
warnings: introduce -Wprecedence
authorValentin Tolmer <nitnelave1@gmail.com>
Wed, 30 Jan 2013 10:30:15 +0000 (11:30 +0100)
committerAkim Demaille <akim@lrde.epita.fr>
Wed, 30 Jan 2013 20:39:08 +0000 (21:39 +0100)
commitcc2235ace2d91338663caeec288743092a6b3aeb
treef41aef2c75d1d4068584628f3d02fe8b5988bcb3
parentdf1ca1b0de2d99879f7b41e64d8bf285f163b1aa
warnings: introduce -Wprecedence

The new warning category "precedence" flags useless precedence and
associativity.  -Wprecedence can now be used, it is disabled by default.
The warnings about precedence and associativity are grouped into one, and
the testsuite was corrected accordingly.

* src/complain.h (warnings): Introduce "precedence".
* src/complain.c (warnings_print_categories): Adjust.
* src/getargs.c (warnings_args, warning_types): Likewise.
* src/symtab.h, src/symtab.c (print_associativity_warnings): Remove.
* src/symtab.h (register_assoc): Correct arguments.
* src/symtab.c (print_precedence_warnings): Print both warnings together.
* doc/bison.texi (Bison options): Document the warnings and provide an
example.
* tests/conflicts.at, tests/existing.at, tests/local.at,
* tests/regression.at: Adapt the testsuite for the new category
(-Wprecedence instead of -Wother where appropriate).
12 files changed:
NEWS
doc/bison.texi
src/complain.c
src/complain.h
src/getargs.c
src/main.c
src/symtab.c
src/symtab.h
tests/conflicts.at
tests/existing.at
tests/local.at
tests/regression.at