+/** Raise a complaint. That can be a fatal error, a complaint or just a
+ warning. */
+
+static inline void
+complains (const location *loc, warnings flags, const char *message,
+ va_list args)
+{
+ if (flags & complaint)
+ {
+ error_message (loc, complaint, NULL, message, args);
+ complaint_issued = true;
+ }
+ else if (flags & fatal)
+ {
+ error_message (loc, fatal, _("fatal error"), message, args);
+ exit (EXIT_FAILURE);
+ }
+ else if (flags & Wyacc)
+ {
+ if (yacc_flag)
+ {
+ error_message (loc, flags, NULL, message, args);
+ complaint_issued = true;
+ }
+ else if (warnings_flag & Wyacc)
+ {
+ set_warning_issued ();
+ error_message (loc, flags, _("warning"), message, args);
+ }
+ }
+ else if (warnings_flag & flags)
+ {
+ set_warning_issued ();
+ error_message (loc, flags, _("warning"), message, args);
+ }