mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-16 07:43:03 +00:00
errors: introduce the -Werror=CATEGORY option
This new option is a lot more flexible than the previous one. Its details will be discussed in the NEWS and info file, in a forthcoming change. If no category is specified (ie: used as simply "-Werror"), the functionality is the same as before. * src/complain.c (errors_flag): New variable. (set_warning_issued): Accept warning categories as an argument. * src/complain.h (Wall): Better definition. * src/getargs.c (flags_argmatch): Support for the new format. (usage): Update -Werror to -Werror[=CATEGORY] format. * src/complain.c (errors_flag): New variable. (set_warning_issued): Accept warning categories as an argument. * src/complain.h (Wall): Better definition. * src/getargs.c (flags_argmatch): Support for the new format. (usage): Update -Werror to -Werror=[CATEGORY] format. Signed-off-by: Akim Demaille <akim@lrde.epita.fr>
This commit is contained in:
committed by
Akim Demaille
parent
11b192127c
commit
9503b0a4a8
9
NEWS
9
NEWS
@@ -90,9 +90,8 @@ GNU Bison NEWS
|
||||
foo.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
|
||||
foo.y: warning: 2 reduce/reduce conflicts [-Wconflicts-rr]
|
||||
$ bison -Werror foo.y
|
||||
bison: warnings being treated as errors
|
||||
foo.y: warning: 1 shift/reduce conflict [-Wconflicts-sr]
|
||||
foo.y: warning: 2 reduce/reduce conflicts [-Wconflicts-rr]
|
||||
foo.y: error: 1 shift/reduce conflict [-Werror=conflicts-sr]
|
||||
foo.y: error: 2 reduce/reduce conflicts [-Werror=conflicts-rr]
|
||||
|
||||
When %expect or %expect-rr is used, such as with bar.y:
|
||||
|
||||
@@ -111,8 +110,8 @@ GNU Bison NEWS
|
||||
New one:
|
||||
|
||||
$ bison bar.y
|
||||
bar.y: shift/reduce conflicts: 1 found, 0 expected
|
||||
bar.y: reduce/reduce conflicts: 2 found, 0 expected
|
||||
bar.y: error: shift/reduce conflicts: 1 found, 0 expected
|
||||
bar.y: error: reduce/reduce conflicts: 2 found, 0 expected
|
||||
|
||||
** Additional yylex/yyparse arguments
|
||||
|
||||
|
||||
Reference in New Issue
Block a user