[PR middle-end/117263] Avoid unused-but-set warning in genautomata
This is a trivial bug where a user wanted to define NDEBUG when building genautomata, presumably trying to debug its behavior. This resulted in a unused-but-set warning which caused the build to fail. Dario included the trivial fixes in the PR which I put through the usual bootstrap & regression test as well as compiling genautomata with NDEBUG. Pushing to the trunk. PR middle-end/117263 gcc/ * genautomata.cc (output_statistics): Avoid set but unnused warnings when compiling with NDEBUG.
This commit is contained in:
parent
a8d0a2dd65
commit
b81bb3ed21
1 changed files with 5 additions and 1 deletions
|
@ -9088,8 +9088,8 @@ static void
|
|||
output_statistics (FILE *f)
|
||||
{
|
||||
automaton_t automaton;
|
||||
int states_num;
|
||||
#ifndef NDEBUG
|
||||
int states_num;
|
||||
int transition_comb_vect_els = 0;
|
||||
int transition_full_vect_els = 0;
|
||||
int min_issue_delay_vect_els = 0;
|
||||
|
@ -9106,13 +9106,17 @@ output_statistics (FILE *f)
|
|||
automaton->NDFA_states_num, automaton->NDFA_arcs_num);
|
||||
fprintf (f, " %5d DFA states, %5d DFA arcs\n",
|
||||
automaton->DFA_states_num, automaton->DFA_arcs_num);
|
||||
#ifndef NDEBUG
|
||||
states_num = automaton->DFA_states_num;
|
||||
#endif
|
||||
if (!no_minimization_flag)
|
||||
{
|
||||
fprintf (f, " %5d minimal DFA states, %5d minimal DFA arcs\n",
|
||||
automaton->minimal_DFA_states_num,
|
||||
automaton->minimal_DFA_arcs_num);
|
||||
#ifndef NDEBUG
|
||||
states_num = automaton->minimal_DFA_states_num;
|
||||
#endif
|
||||
}
|
||||
fprintf (f, " %5d all insns %5d insn equivalence classes\n",
|
||||
description->insns_num, automaton->insn_equiv_classes_num);
|
||||
|
|
Loading…
Add table
Reference in a new issue