mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 04:13:03 +00:00
Add -Wconflicts-sr and -Wconflicts-rr.
Thus, conflict reports are now affected by -Werror and -Wnone
(unless %expect or %expect-rr is specified). Reported by George
Neuner at
<http://lists.gnu.org/archive/html/bug-bison/2010-08/msg00002.html>.
* NEWS (2.5): Document.
* doc/bison.texinfo (Bison Options): Document.
* src/complain.c, src/complain.h (set_warning_issued): Export
function.
* src/conflicts.c (conflicts_print): Suppress conflict report
based on -Wno-conflicts-sr and -Wno-conflicts-rr, and treat
conflicts as errors if -Werror.
* src/getargs.c (warnings_flag): Initialize with
warnings_conflicts_sr and warnings_conflicts_rr as well.
(warnings_args, warnings_types): Add entries for
warnings_conflicts_sr and warnings_conflicts_rr.
(usage): Update.
* src/getargs.h (enum warnings): Add entries for
warnings_conflicts_sr and warnings_conflicts_rr.
* tests/conflicts.at (-W versus %expect and %expect-rr): New test
group.
* tests/local.at (AT_BISON_CHECK_NO_XML): Update now that the
conflict report can produce a "warnings being treated as errors"
message. Also, check that stderr is now fully scrubbed by -Wnone
when the exit status is 0.
(cherry picked from commit 6f8bdce25d)
This commit is contained in:
18
NEWS
18
NEWS
@@ -368,6 +368,24 @@ Bison News
|
||||
|
||||
bison -Wall,no-yacc gram.y
|
||||
|
||||
*** Bison now treats S/R and R/R conflicts like other warnings:
|
||||
|
||||
Previously, conflict reports were independent of Bison's normal
|
||||
warning system. Now, Bison recognizes the warning categories
|
||||
"conflicts-sr" and "conflicts-rr". This change has important
|
||||
consequences for the -W and --warnings command-line options. For
|
||||
example:
|
||||
|
||||
bison -Wno-conflicts-sr gram.y # S/R conflicts not reported
|
||||
bison -Wno-conflicts-rr gram.y # R/R conflicts not reported
|
||||
bison -Wnone gram.y # no conflicts are reported
|
||||
bison -Werror gram.y # any conflict is an error
|
||||
|
||||
However, as before, if the %expect or %expect-rr directive is
|
||||
specified, an unexpected number of conflicts is an error, and an
|
||||
expected number of conflicts is not reported, so -W and --warning
|
||||
then have no effect on the conflict report.
|
||||
|
||||
*** The "none" category no longer disables a preceding "error":
|
||||
|
||||
For example, for the following command line, Bison now reports
|
||||
|
||||
Reference in New Issue
Block a user