X-Git-Url: https://git.saurik.com/bison.git/blobdiff_plain/ba7560e26bfa2f5a340545830d46e0437fcb701a..89eb3c76532c0c5f9f3207474c55c300a239fce8:/src/getargs.c diff --git a/src/getargs.c b/src/getargs.c index 94d24329..c34efa21 100644 --- a/src/getargs.c +++ b/src/getargs.c @@ -204,18 +204,18 @@ static const char * const warnings_args[] = /* In a series of synonyms, present the most meaningful first, so that argmatch_valid be more readable. */ "none - no warnings", - "error - warnings are errors", "yacc - incompatibilities with POSIX YACC", "all - all of the above", + "error - warnings are errors", 0 }; static const int warnings_types[] = { warnings_none, - warnings_error, warnings_yacc, - warnings_all + warnings_all, + warnings_error }; ARGMATCH_VERIFY (warnings_args, warnings_types); @@ -472,7 +472,10 @@ getargs (int argc, char *argv[]) break; case 'W': - FLAGS_ARGMATCH (warnings, optarg); + if (optarg) + FLAGS_ARGMATCH (warnings, optarg); + else + warnings_flag |= warnings_all; break; case LOCATIONS_OPTION: