mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 20:33:03 +00:00
c++: fix warning message for automove
* src/scan-code.l: Remove 'enabled'. Use only $k (numeric), even for named references, for clarity. * tests/c++.at: Adjust expectations.
This commit is contained in:
@@ -681,8 +681,8 @@ handle_action_dollar (symbol_list *rule, char *text, location dollar_loc)
|
||||
if (muscle_percent_define_ifdef ("api.value.automove")
|
||||
&& sym->action_props.is_value_used)
|
||||
complain (&dollar_loc, Wother,
|
||||
_("multiple occurrences of $%s with api.value.automove enabled"),
|
||||
cp);
|
||||
_("multiple occurrences of $%d with api.value.automove"),
|
||||
n);
|
||||
sym->action_props.is_value_used = true;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -211,13 +211,13 @@ exp:
|
||||
]])
|
||||
|
||||
AT_BISON_CHECK([[-fcaret input.yy]], [0], [],
|
||||
[[input.yy:16.33-34: warning: multiple occurrences of $2 with api.value.automove enabled [-Wother]
|
||||
[[input.yy:16.33-34: warning: multiple occurrences of $2 with api.value.automove [-Wother]
|
||||
| "twice" exp { $$ = $2 + $2; }
|
||||
^^
|
||||
input.yy:17.33-36: warning: multiple occurrences of $val with api.value.automove enabled [-Wother]
|
||||
input.yy:17.33-36: warning: multiple occurrences of $2 with api.value.automove [-Wother]
|
||||
| "thrice" exp[val] { $$ = $2 + $val + $2; }
|
||||
^^^^
|
||||
input.yy:17.40-41: warning: multiple occurrences of $2 with api.value.automove enabled [-Wother]
|
||||
input.yy:17.40-41: warning: multiple occurrences of $2 with api.value.automove [-Wother]
|
||||
| "thrice" exp[val] { $$ = $2 + $val + $2; }
|
||||
^^
|
||||
]])
|
||||
|
||||
Reference in New Issue
Block a user