mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-11 13:23:04 +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:
@@ -68,6 +68,7 @@ static const char * const warnings_args[] =
|
||||
"other",
|
||||
"all",
|
||||
"error",
|
||||
"everything",
|
||||
0
|
||||
};
|
||||
|
||||
@@ -83,7 +84,8 @@ static const int warnings_types[] =
|
||||
Wprecedence,
|
||||
Wother,
|
||||
Wall,
|
||||
Werror
|
||||
Werror,
|
||||
Weverything
|
||||
};
|
||||
|
||||
ARGMATCH_VERIFY (warnings_args, warnings_types);
|
||||
@@ -94,10 +96,10 @@ warning_argmatch (char const *arg, size_t no, size_t err)
|
||||
int value = XARGMATCH ("--warning", arg + no + err,
|
||||
warnings_args, warnings_types);
|
||||
|
||||
/* -Wnone == -Wno-all, and -Wno-none == -Wall. */
|
||||
/* -Wnone == -Wno-everything, and -Wno-none == -Weverything. */
|
||||
if (!value)
|
||||
{
|
||||
value = Wall;
|
||||
value = Weverything;
|
||||
no = !no;
|
||||
}
|
||||
|
||||
@@ -145,7 +147,7 @@ warnings_argmatch (char *args)
|
||||
else if (STREQ (args, "no-error"))
|
||||
{
|
||||
warnings_are_errors = false;
|
||||
warning_argmatch ("no-error=all", 3, 6);
|
||||
warning_argmatch ("no-error=everything", 3, 6);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user