mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
Complain about unused %define variables and %code qualifiers.
* NEWS (2.5): Document. * data/bison.m4 (b4_check_user_names): Complain instead of warn. * doc/bison.texinfo (Decl Summary): Document complaint, and improve %define documentation a little otherwise. * tests/input.at (Reject unused %code qualifiers): Update. (%define errors): Update. (%define, --define, --force-define): Update. (%define backward compatibility): Update. (Unused %define api.pure): Update. * tests/push.at (Push Parsing: Unsupported Skeletons): Update.
This commit is contained in:
@@ -500,10 +500,10 @@ b4_define_user_code([stype])
|
||||
|
||||
|
||||
# b4_check_user_names(WHAT, USER-LIST, BISON-NAMESPACE)
|
||||
# --------------------------------------------------------
|
||||
# Warn if any name of type WHAT is used by the user (as recorded in USER-LIST)
|
||||
# but is not used by Bison (as recorded by macros in the namespace
|
||||
# BISON-NAMESPACE).
|
||||
# -----------------------------------------------------
|
||||
# Complain if any name of type WHAT is used by the user (as recorded in
|
||||
# USER-LIST) but is not used by Bison (as recorded by macros in the
|
||||
# namespace BISON-NAMESPACE).
|
||||
#
|
||||
# USER-LIST must expand to a list specifying all user occurrences of all names
|
||||
# of type WHAT. Each item in the list must be a triplet specifying one
|
||||
@@ -541,9 +541,9 @@ m4_pushdef([b4_user_name], m4_car(b4_occurrence))dnl
|
||||
m4_pushdef([b4_start], m4_car(m4_shift(b4_occurrence)))dnl
|
||||
m4_pushdef([b4_end], m4_shift(m4_shift(b4_occurrence)))dnl
|
||||
m4_ifndef($3[(]m4_quote(b4_user_name)[)],
|
||||
[b4_warn_at([b4_start], [b4_end],
|
||||
[[%s `%s' is not used]],
|
||||
[$1], [b4_user_name])])[]dnl
|
||||
[b4_complain_at([b4_start], [b4_end],
|
||||
[[%s `%s' is not used]],
|
||||
[$1], [b4_user_name])])[]dnl
|
||||
m4_popdef([b4_occurrence])dnl
|
||||
m4_popdef([b4_user_name])dnl
|
||||
m4_popdef([b4_start])dnl
|
||||
|
||||
Reference in New Issue
Block a user