mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
diagnostics: no longer pretty-print rules in error messages, carets suffice
* src/gram.c (grammar_rules_useless_report): Let -fcaret handle the pretty-printing of the guilty rules. (rule_print): Inline in its only use. * tests/conflicts.at, tests/existing.at, tests/reduce.at, * tests/regression.at: Adjust. * NEWS: Document.
This commit is contained in:
23
NEWS
23
NEWS
@@ -58,6 +58,29 @@ GNU Bison NEWS
|
||||
activated by default. The old format can still be used by invoking Bison
|
||||
with -fno-caret (or -fnone).
|
||||
|
||||
Some error messages that reproduced excerpts of the grammar are now using
|
||||
the caret information only. For instance on:
|
||||
|
||||
%%
|
||||
exp: 'a' | 'a';
|
||||
|
||||
Bison 2.7 reports:
|
||||
|
||||
in.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
|
||||
in.y:2.12-14: warning: rule useless in parser due to conflicts: exp: 'a' [-Wother]
|
||||
|
||||
Now bison reports:
|
||||
|
||||
in.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
|
||||
in.y:2.12-14: warning: rule useless in parser due to conflicts [-Wother]
|
||||
exp: 'a' | 'a';
|
||||
^^^
|
||||
|
||||
and "bison -fno-caret" reports:
|
||||
|
||||
in.y: warning: 1 reduce/reduce conflict [-Wconflicts-rr]
|
||||
in.y:2.12-14: warning: rule useless in parser due to conflicts [-Wother]
|
||||
|
||||
*** Enhancements of the -Werror option
|
||||
|
||||
The -Werror=CATEGORY option is now recognized, and will treat specified
|
||||
|
||||
Reference in New Issue
Block a user