mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-17 00:03:03 +00:00
diagnostics: "-Werror -Wno-error=foo" must not emit errors
Currently "-Werror -Wno-error=foo" still turns "foo" warnings into errors. Reported by Alexandre Duret-Lutz. See http://lists.gnu.org/archive/html/bug-bison/2013-09/msg00015.html. * src/complain.c (errority, errority_flag): New. (complain_init): Initialize the latter. (warning_argmatch): Extract the loop iterating on the flag's bits. Set and unset errority_flag here. (warnings_argmatch): -Wno-error is not the same as -Wno-error=everything: we must remember if category foo was explicitly turned in an error/warning via -W(no-)error=foo. (warning_severity): Use errority_flag. * tests/input.at (Symbols): Just check --yacc, not -Wyacc, that's the job of tests on -W. (-Werror is not affected by -Wnone and -Wall): Rename as... (-Werror combinations): this. Tests more combinations of -W, -W(no-)error, and -W(no-)error=foo. * tests/local.at (AT_BISON_CHECK_WARNINGS): Don't expect -Werror to turn runs that issue warnings into runs with errors, as the warnings might be enforced as warnings by -Wno-error=foo, in which case -Werror does not change anything. * doc/bison.texi (Bison Options): Try to be clearer about how -W(no-)error and -W(no-)error=foo interact.
This commit is contained in:
11
NEWS
11
NEWS
@@ -4,7 +4,16 @@ GNU Bison NEWS
|
||||
|
||||
** Bug fixes
|
||||
|
||||
Portability issues in the test suite.
|
||||
*** Portability issues in the test suite.
|
||||
|
||||
*** Fixes of the -Werror option
|
||||
|
||||
Options such as "-Werror -Wno-error=foo" were still turning "foo"
|
||||
diagnostics into errors instead of warnings. This is fixed.
|
||||
|
||||
Actually, for consistency with GCC, "-Wno-error=foo -Werror" now also
|
||||
leaves "foo" diagnostics as warnings. Similarly, with "-Werror=foo
|
||||
-Wno-error", "foo" diagnostics are now errors.
|
||||
|
||||
* Noteworthy changes in release 3.0 (2013-07-25) [stable]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user