Revert "introduced a GCC-like -Werror=type"

This reverts commit 981c53e257.
This commit is contained in:
Akim Demaille
2012-09-21 09:15:45 +02:00
parent 6652eeba58
commit 0d43e6057b
4 changed files with 31 additions and 77 deletions

View File

@@ -83,63 +83,31 @@ flags_argmatch (const char *option,
int all, int *flags, char *args)
{
if (args)
{
args = strtok (args, ",");
/* Not sure whether we should keep this : -Werror=no-bar */
int no = STRPREFIX_LIT ("no-", args) ? 3 : 0;
args += no;
int value = 0;
while (args)
{
int err = STRPREFIX_LIT ("error", args);
if (err)
args += (args[5] == '=') ? 6 : 5;
if (!err || args[-1] == '=')
value = XARGMATCH (option, args, keys, values);
if (value == 0)
{
if (no)
args = strtok (args, ",");
while (args)
{
if (err)
/* Using &= ~all activates complaint, silent and fatal */
errors_flag = Wnone;
int no = STRPREFIX_LIT ("no-", args) ? 3 : 0;
int value = XARGMATCH (option, args + no, keys, values);
if (value == 0)
{
if (no)
*flags |= all;
else
*flags &= ~all;
}
else
*flags |= all;
{
if (no)
*flags &= ~value;
else
*flags |= value;
}
args = strtok (NULL, ",");
}
else
{
if (err)
errors_flag |= all;
else
*flags &= ~all;
}
}
else
{
if (no)
{
if (err)
errors_flag &= ~value;
else
*flags &= ~value;
}
else
{
if (err)
{
errors_flag |= value;
warnings_flag |= value;
}
else
*flags |= value;
}
}
args = strtok (NULL, ",");
}
}
else
*flags |= all;
}
/** Decode a set of sub arguments.