mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 04:43:03 +00:00
Convert multiple variable definition warnings to complaints.
* NEWS (2.5): Add a new entry for that change. * doc/bison.texinfo (Decl Summary): Update %define entry. (Bison Options): Update -D/--define/-F/--force-define entry. * src/muscle_tab.c (muscle_percent_define_insert): Implement. * src/muscle_tab.h (muscle_percent_define_insert): Update comments. * tests/input.at (`%define errors'): Update. (`%define, --define, --force-define'): Update.
This commit is contained in:
@@ -436,9 +436,9 @@ muscle_percent_define_insert (char const *variable, location variable_loc,
|
||||
free (variable_tr);
|
||||
return;
|
||||
}
|
||||
warn_at (variable_loc, _("%s `%s' redefined"),
|
||||
"%define variable", variable);
|
||||
warn_at (muscle_percent_define_get_loc (variable),
|
||||
complain_at (variable_loc, _("%s `%s' redefined"),
|
||||
"%define variable", variable);
|
||||
complain_at (muscle_percent_define_get_loc (variable),
|
||||
_("previous definition"));
|
||||
}
|
||||
|
||||
|
||||
@@ -133,7 +133,7 @@ typedef enum {
|
||||
/* Define the muscles for %define variable VARIABLE with VALUE specified
|
||||
at VARIABLE_LOC in the manner HOW unless it was specified in the
|
||||
grammar file while the previous definition for VARIABLE was specified
|
||||
with -F/--force-define. Warn if a previous definition is being
|
||||
with -F/--force-define. Complain if a previous definition is being
|
||||
overridden and the new definition is specified in the grammar file.
|
||||
(These rules support the documented behavior as long as command-line
|
||||
definitions are processed before grammar file definitions.) Record
|
||||
|
||||
Reference in New Issue
Block a user