mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-10 12:53:03 +00:00
muscle: minor simplification which uncovers a missing warning
* src/muscle-tab.c (muscle_percent_define_ensure): Discover the virtues of || to factor conditionals. * NEWS: As api.pure is no longer flagged as "used" by accident, we now have warnings for useless definitions. * tests/calc.at: So remove api.pure settings when running C++ tests, since C++ skeletons use a pure interface.
This commit is contained in:
2
NEWS
2
NEWS
@@ -62,6 +62,8 @@ GNU Bison NEWS
|
|||||||
Changes in Bison 2.7 introduced a dependency on FILE and fprintf when
|
Changes in Bison 2.7 introduced a dependency on FILE and fprintf when
|
||||||
locations are enabled. This is fixed.
|
locations are enabled. This is fixed.
|
||||||
|
|
||||||
|
*** Warnings about useless %pure-parser/%define api.pure are restored
|
||||||
|
|
||||||
** Diagnostics reported by Bison
|
** Diagnostics reported by Bison
|
||||||
|
|
||||||
Most of these features were contributed by Théophile Ranquet and Victor
|
Most of these features were contributed by Théophile Ranquet and Victor
|
||||||
|
|||||||
@@ -541,10 +541,8 @@ muscle_percent_define_ensure (char const *variable, location loc,
|
|||||||
|
|
||||||
/* Don't complain is VARIABLE is already defined, but be sure to set
|
/* Don't complain is VARIABLE is already defined, but be sure to set
|
||||||
its value to VAL. */
|
its value to VAL. */
|
||||||
if (!muscle_find_const (name))
|
if (!muscle_find_const (name)
|
||||||
muscle_percent_define_insert (variable, loc, muscle_keyword, val,
|
|| muscle_percent_define_flag_if (variable) != value)
|
||||||
MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE);
|
|
||||||
if (muscle_percent_define_flag_if (variable) != value)
|
|
||||||
muscle_percent_define_insert (variable, loc, muscle_keyword, val,
|
muscle_percent_define_insert (variable, loc, muscle_keyword, val,
|
||||||
MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE);
|
MUSCLE_PERCENT_DEFINE_GRAMMAR_FILE);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -683,13 +683,13 @@ AT_CHECK_CALC_LALR1_CC([%defines %locations %define parse.error verbose %name-pr
|
|||||||
AT_CHECK_CALC_LALR1_CC([%locations %define parse.error verbose %define api.prefix "calc" %verbose %yacc])
|
AT_CHECK_CALC_LALR1_CC([%locations %define parse.error verbose %define api.prefix "calc" %verbose %yacc])
|
||||||
AT_CHECK_CALC_LALR1_CC([%locations %define parse.error verbose %debug %name-prefix "calc" %verbose %yacc])
|
AT_CHECK_CALC_LALR1_CC([%locations %define parse.error verbose %debug %name-prefix "calc" %verbose %yacc])
|
||||||
|
|
||||||
AT_CHECK_CALC_LALR1_CC([%locations %pure-parser %define parse.error verbose %debug %define api.prefix "calc" %verbose %yacc])
|
AT_CHECK_CALC_LALR1_CC([%locations %define parse.error verbose %debug %define api.prefix "calc" %verbose %yacc])
|
||||||
AT_CHECK_CALC_LALR1_CC([%locations %pure-parser %define parse.error verbose %debug %define api.prefix "calc" %define api.token.prefix {TOK_} %verbose %yacc])
|
AT_CHECK_CALC_LALR1_CC([%locations %define parse.error verbose %debug %define api.prefix "calc" %define api.token.prefix {TOK_} %verbose %yacc])
|
||||||
|
|
||||||
AT_CHECK_CALC_LALR1_CC([%defines %locations %pure-parser %define parse.error verbose %debug %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])
|
AT_CHECK_CALC_LALR1_CC([%defines %locations %define parse.error verbose %debug %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])
|
||||||
|
|
||||||
AT_CHECK_CALC_LALR1_CC([%pure-parser %define parse.error verbose %debug %define api.prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])
|
AT_CHECK_CALC_LALR1_CC([%define parse.error verbose %debug %define api.prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])
|
||||||
AT_CHECK_CALC_LALR1_CC([%defines %locations %pure-parser %define parse.error verbose %debug %define api.prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])
|
AT_CHECK_CALC_LALR1_CC([%defines %locations %define parse.error verbose %debug %define api.prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -716,10 +716,9 @@ AT_CHECK_CALC_GLR_CC([%defines %define parse.error verbose %name-prefix "calc" %
|
|||||||
AT_CHECK_CALC_GLR_CC([%define parse.error verbose %define api.prefix "calc" %verbose %yacc])
|
AT_CHECK_CALC_GLR_CC([%define parse.error verbose %define api.prefix "calc" %verbose %yacc])
|
||||||
|
|
||||||
AT_CHECK_CALC_GLR_CC([%debug])
|
AT_CHECK_CALC_GLR_CC([%debug])
|
||||||
|
|
||||||
AT_CHECK_CALC_GLR_CC([%define parse.error verbose %debug %name-prefix "calc" %verbose %yacc])
|
AT_CHECK_CALC_GLR_CC([%define parse.error verbose %debug %name-prefix "calc" %verbose %yacc])
|
||||||
|
AT_CHECK_CALC_GLR_CC([%define parse.error verbose %debug %name-prefix "calc" %define api.token.prefix {TOK_} %verbose %yacc])
|
||||||
|
|
||||||
AT_CHECK_CALC_GLR_CC([%pure-parser %define parse.error verbose %debug %name-prefix "calc" %verbose %yacc])
|
AT_CHECK_CALC_GLR_CC([%locations %defines %define parse.error verbose %debug %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])
|
||||||
AT_CHECK_CALC_GLR_CC([%pure-parser %define parse.error verbose %debug %name-prefix "calc" %define api.token.prefix {TOK_} %verbose %yacc])
|
AT_CHECK_CALC_GLR_CC([%locations %defines %define parse.error verbose %debug %define api.prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])
|
||||||
|
|
||||||
AT_CHECK_CALC_GLR_CC([%locations %defines %pure-parser %define parse.error verbose %debug %name-prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])
|
|
||||||
AT_CHECK_CALC_GLR_CC([%locations %defines %pure-parser %define parse.error verbose %debug %define api.prefix "calc" %verbose %yacc %parse-param {semantic_value *result} %parse-param {int *count}])
|
|
||||||
|
|||||||
Reference in New Issue
Block a user