mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
diagnostics: no longer include the yacc category in -Wall
It would be a pity to warn the users against Bison features... http://lists.gnu.org/archive/html/bison-patches/2013-02/msg00107.html * src/complain.h, src/complain.c (Wall): Disable Wyacc. (Weverything): New (hidden so far) category which really denotes all the categories (what used to be Wall). (warnings_args, warnings_types): Adjust. (warning_argmatch): Now !none = Weverything and conversely, no longer Wall. * NEWS, doc/bison.texi, src/getargs.c: Adjust the documentation. * tests/input.at (-Werror is not affected by -Wnone and -Wall): Adjust by not using a -Wyacc type of warning.
This commit is contained in:
@@ -1708,27 +1708,27 @@ AT_SETUP([[-Werror is not affected by -Wnone and -Wall]])
|
||||
|
||||
AT_DATA([[input.y]],
|
||||
[[%%
|
||||
foo-bar: %empty;
|
||||
a: '0' { $$ = $; };
|
||||
]])
|
||||
|
||||
# -Werror is not enabled by -Wall or equivalent.
|
||||
AT_BISON_CHECK([[-Wall input.y]], [[0]], [[]],
|
||||
[[input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar [-Wyacc]
|
||||
[[input.y:2.15: warning: stray '$' [-Wother]
|
||||
]])
|
||||
AT_BISON_CHECK([[-W input.y]], [[0]], [[]],
|
||||
[[input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar [-Wyacc]
|
||||
[[input.y:2.15: warning: stray '$' [-Wother]
|
||||
]])
|
||||
AT_BISON_CHECK([[-Wno-none input.y]], [[0]], [[]],
|
||||
[[input.y:2.1-7: warning: POSIX Yacc forbids dashes in symbol names: foo-bar [-Wyacc]
|
||||
[[input.y:2.15: warning: stray '$' [-Wother]
|
||||
]])
|
||||
|
||||
# -Werror is not disabled by -Wnone or equivalent.
|
||||
AT_BISON_CHECK([[-Werror,none,yacc input.y]], [[1]], [[]], [[stderr]])
|
||||
AT_CHECK([[sed 's/^.*bison:/bison:/' stderr]], [[0]],
|
||||
[[input.y:2.1-7: error: POSIX Yacc forbids dashes in symbol names: foo-bar [-Werror=yacc]
|
||||
AT_BISON_CHECK([[-Werror,none,other input.y]], [[1]], [[]],
|
||||
[[input.y:2.15: error: stray '$' [-Werror=other]
|
||||
]])
|
||||
AT_BISON_CHECK([[-Werror,no-all,other input.y]], [[1]], [[]],
|
||||
[[input.y:2.15: error: stray '$' [-Werror=other]
|
||||
]])
|
||||
[mv stderr experr]
|
||||
AT_BISON_CHECK([[-Werror,no-all,yacc input.y]], [[1]], [[]], [[experr]])
|
||||
|
||||
AT_CLEANUP
|
||||
|
||||
|
||||
Reference in New Issue
Block a user