mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-15 07:13:02 +00:00
warnings: factoring: complaints
* src/complain.c (error_message): Accept warning categories (an integer) as argument. Location is a 'const location *' instead of 'location *'. (ERROR_MESSAGE): Delete it. * src/complain.c, src/complain.h (complains): New function. (complain, complain_at, complain_at_indent): Generic functions for complaints. Call 'complains'. (warn_at, warn_at_indent, warn, yacc_at, midrule_value_at) (fatal_at, fatal): Delete them. Adjust dependencies. * src/complain.h (enum warnings): New fields 'complaint' and 'fatal'. * bootstrap.conf (XGETTEXT_OPTIONS): Adjust.
This commit is contained in:
committed by
Akim Demaille
parent
d0f11c1b62
commit
6fb8b25619
@@ -360,7 +360,7 @@ output_file_name_check (char **file_name)
|
||||
bool conflict = false;
|
||||
if (STREQ (*file_name, grammar_file))
|
||||
{
|
||||
complain (_("refusing to overwrite the input file %s"),
|
||||
complain (complaint, _("refusing to overwrite the input file %s"),
|
||||
quote (*file_name));
|
||||
conflict = true;
|
||||
}
|
||||
@@ -370,8 +370,8 @@ output_file_name_check (char **file_name)
|
||||
for (i = 0; i < file_names_count; i++)
|
||||
if (STREQ (file_names[i], *file_name))
|
||||
{
|
||||
warn (_("conflicting outputs to file %s"),
|
||||
quote (*file_name));
|
||||
complain (Wother, _("conflicting outputs to file %s"),
|
||||
quote (*file_name));
|
||||
conflict = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user