mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
cex: make "rerun with '-Wcex'" a note instead of a warning
Currently the suggestion to rerun is a -Wother warning:
warning: 2 shift/reduce conflicts [-Wconflicts-sr]
warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother]
Instead, let's attach it as a subnote of the diagnostic (in the
current case, -Wconflicts-sr):
warning: 2 shift/reduce conflicts [-Wconflicts-sr]
note: rerun with option '-Wcounterexamples' to generate conflict counterexamples
* src/conflicts.c (conflicts_print): Do that.
Adjust the test suite.
This commit is contained in:
@@ -285,7 +285,7 @@ term: 'n'
|
||||
|
||||
AT_BISON_CHECK([[-fcaret input.y]], [], [],
|
||||
[[input.y: warning: 5 reduce/reduce conflicts [-Wconflicts-rr]
|
||||
input.y: warning: rerun with option '-Wcounterexamples' to generate conflict counterexamples [-Wother]
|
||||
input.y: note: rerun with option '-Wcounterexamples' to generate conflict counterexamples
|
||||
input.y:2.14-17: warning: rule useless in parser due to conflicts [-Wother]
|
||||
2 | expr: term | term | term | term | term | term
|
||||
| ^~~~
|
||||
|
||||
Reference in New Issue
Block a user