mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-12 05:43:03 +00:00
build: re-enable compiler warnings, and fix them
There are warnings (-Wextra) in generated C++ code:
ltlparse.cc: In member function 'ltlyy::parser::symbol_number_type
ltlyy::parser::by_state::type_get() const':
ltlparse.cc:452:33: warning: enumeral and non-enumeral type in
conditional expression
return state == empty_state ? empty_symbol : yystos_[state];
Reported by Alexandre Duret-Lutz.
It turns out that -Wall and -Wextra were disabled because of a stupid
typo.
* configure.ac: Fix the stupid typo.
* data/lalr1.cc, src/AnnotationList.c, src/InadequacyList.c,
* src/ielr.c, src/print.c, src/scan-code.l, src/symlist.c,
* src/symlist.h, src/symtab.c, src/tables.c, tests/actions.at,
* tests/calc.at, tests/cxx-type.at, tests/glr-regression.at,
* tests/named-refs.at, tests/torture.at:
Fix warnings, mostly issues about variables used only with assertions,
which are disabled with -DNDEBUG.
This commit is contained in:
@@ -664,7 +664,7 @@ handle_action_dollar (symbol_list *rule, char *text, location dollar_loc)
|
||||
|
||||
case LHS_REF:
|
||||
if (!type_name)
|
||||
type_name = symbol_list_n_type_name_get (rule, dollar_loc, 0);
|
||||
type_name = symbol_list_n_type_name_get (rule, 0);
|
||||
|
||||
if (!type_name)
|
||||
{
|
||||
@@ -695,8 +695,7 @@ handle_action_dollar (symbol_list *rule, char *text, location dollar_loc)
|
||||
if (max_left_semantic_context < 1 - n)
|
||||
max_left_semantic_context = 1 - n;
|
||||
if (!type_name && 0 < n)
|
||||
type_name =
|
||||
symbol_list_n_type_name_get (effective_rule, dollar_loc, n);
|
||||
type_name = symbol_list_n_type_name_get (effective_rule, n);
|
||||
if (!type_name)
|
||||
{
|
||||
if (union_seen | tag_seen)
|
||||
|
||||
Reference in New Issue
Block a user