"other",
"all",
"error",
+ "everything",
0
};
Wprecedence,
Wother,
Wall,
- Werror
+ Werror,
+ Weverything
};
ARGMATCH_VERIFY (warnings_args, warnings_types);
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;
}
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
{
}
}
+bool
+warning_is_unset (warnings flags)
+{
+ size_t b;
+ for (b = 0; b < warnings_size; ++b)
+ if (flags & 1 << b && warnings_flag[b] != severity_unset)
+ return false;
+ return true;
+}
/** Display a "[-Wyacc]" like message on \a f. */
_("deprecated directive: %s, use %s"),
quote (old), quote_n (1, upd));
}
+
+void
+duplicate_directive (char const *directive,
+ location first, location second)
+{
+ unsigned i = 0;
+ complain (&second, complaint, _("only one %s allowed per rule"), directive);
+ i += SUB_INDENT;
+ complain_indent (&first, complaint, &i, _("previous declaration"));
+}