mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 23:33:03 +00:00
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).
This commit is contained in:
committed by
Akim Demaille
parent
df1ca1b0de
commit
cc2235ace2
@@ -36,7 +36,9 @@ typedef enum
|
||||
Wconflicts_sr = 1 << 2, /**< S/R conflicts. */
|
||||
Wconflicts_rr = 1 << 3, /**< R/R conflicts. */
|
||||
Wdeprecated = 1 << 4, /**< Obsolete constructs. */
|
||||
Wother = 1 << 5, /**< All other warnings. */
|
||||
Wprecedence = 1 << 5, /**< Useless precedence and associativity. */
|
||||
|
||||
Wother = 1 << 6, /**< All other warnings. */
|
||||
|
||||
Werror = 1 << 10, /** This bit is no longer used. */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user